Click here to Skip to main content
12,300,841 members (60,751 online)
Click here to Skip to main content
Articles » Languages » C# » Utilities » Downloads

Stats

39.1K views
1.3K downloads
71 bookmarked
Posted

Project Tool

, 23 Sep 2007 CPOL
Backup your C# solution and projects for archive or source code sharing. Temporary or unused files are excluded.
ProjectTool.exe
bin
Release
ICSharpCode.SharpZipLib.dll
ProjectTool.exe
CodeLib
Controls
ProjectTool
Items
Project
Propertys
Solution
Icon
cs.png
default.ico
dir.png
diro.png
dll.png
ProjectTool.exe
Checksums
Compress
Deflate
Common
Decode
Encode
Formats
Zip
HuffmanCoding
LempelZivWelch
LempelZiv
Resources
Icon
cs.png
default.ico
dir.png
diro.png
dll.png
ProjectTool.exe
cs.png
default.ico
dir.png
diro.png
dll.png
ICSharpCode.SharpZipLib.dll
ProjectTool.exe
using System;
using System.Collections.Generic;
using System.Text;

namespace QiHe.CodeLib.Compress.DeflateFormat
{
    public static class DeflateCoding
    {
        /// <summary>
        /// Copy lengths for literal codes 257..285
        /// </summary>
        static int[] CPLENS = {
								 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
								 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258
							  };

        /// <summary>
        /// Extra bits for literal codes 257..285
        /// </summary>
        static int[] CPLEXT = {
								 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
								 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0
							  };

        /// <summary>
        /// Copy offsets for distance codes 0..29
        /// </summary>
        static int[] CPDIST = {
								1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
								257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
								8193, 12289, 16385, 24577
							  };

        /// <summary>
        /// Extra bits for distance codes
        /// </summary>
        static int[] CPDEXT = {
								0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
								7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
								12, 12, 13, 13
							  };

        public const int EndOfBlock = 256;

        public static readonly SymbolCoding Length = new SymbolCoding(257, CPLENS, CPLEXT);
        public static readonly SymbolCoding Distance = new SymbolCoding(0, CPDIST, CPDEXT);
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Liu Junfeng
Software Developer (Senior) Beyondsoft SH
China China
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160525.2 | Last Updated 23 Sep 2007
Article Copyright 2006 by Liu Junfeng
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid