Microsoft.Protocols.TestTools.StackSdk.Compression.Mppc.Compressor.EncodeLiteral C# (CSharp) Method

EncodeLiteral() private method

Encode literal according to RFC2118
private EncodeLiteral ( byte literal ) : void
literal byte the literal needed to encoded
return void
        private void EncodeLiteral(byte literal)
        {
            // If the value of the Literal is
            // below hex 0x80, it is encoded unchanged.
            if (literal < 0x80)
            {
                EncodeData(literal, (int)LiteralBitSize.LessThanHex80);
            }
            else
            {
                uint temp = (uint)(((int)LiteralSymbol.MoreThanHex7f
                    << (int)LiteralBitSizeWithoutSymbol.MoreThanHex7f)
                    + literal - LiteralAdding.MoreThanHex7f);
                EncodeData(temp, (int)LiteralBitSize.MoreThanHex7f);
            }
        }