⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 deflatecoding.cs

📁 PDF文件格式解析库源代码
💻 CS
字号:
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);
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -