示例#1
0
文件: ImageBGI.cs 项目: Casidi/GARbro
        void UnpackV1()
        {
            uint[] leaf_nodes_weight;
            using (var enc = new MemoryStream (ReadEncoded()))
                leaf_nodes_weight = ReadWeightTable (enc, 0x100);
            var tree = new HuffmanTree (leaf_nodes_weight);
            byte[] packed = new byte[m_info.IntermediateLength];

            HuffmanDecompress (tree, packed);
            m_output = new byte[Stride * (int)m_info.Height];
            UnpackZeros (packed);
            ReverseAverageSampling();
        }
示例#2
0
文件: ImageBGI.cs 项目: Casidi/GARbro
 void HuffmanDecompress(HuffmanTree tree, byte[] output)
 {
     for (int dst = 0; dst < output.Length; dst++)
     {
         output[dst] = (byte)tree.DecodeToken (this);
     }
 }