SmartAssembly.Zip.SimpleZip.DeflaterHuffman.CompressBlock C# (CSharp) Method

CompressBlock() public method

public CompressBlock ( ) : void
return void
            public void CompressBlock()
            {
                for (int i = 0; i < this.last_lit; i++)
                {
                    int len = this.l_buf[i] & 0xff;
                    int distance = this.d_buf[i];
                    if (distance-- != 0)
                    {
                        int code = this.Lcode(len);
                        this.literalTree.WriteSymbol(code);
                        int count = (code - 0x105) / 4;
                        if ((count > 0) && (count <= 5))
                        {
                            this.pending.WriteBits(len & ((((int) 1) << count) - 1), count);
                        }
                        int num6 = this.Dcode(distance);
                        this.distTree.WriteSymbol(num6);
                        count = (num6 / 2) - 1;
                        if (count > 0)
                        {
                            this.pending.WriteBits(distance & ((((int) 1) << count) - 1), count);
                        }
                    }
                    else
                    {
                        this.literalTree.WriteSymbol(len);
                    }
                }
                this.literalTree.WriteSymbol(0x100);
            }