Static Public Member Functions

static int DecodeWindowBits (BitReader br)
 
static byte DecodeVarLenUint8 (BitReader br)
 
static ushort ReadSymbol (HuffmanCode[] table, int index, BitReader br)
 
static void ReadHuffmanCodeLengths (byte[] code_length_code_lengths, int num_symbols, byte[] code_lengths, BitReader br)
 
static int ReadHuffmanCode (int alphabet_size, HuffmanCode[] tables, int table, BitReader br)
 
static bool JumpToByteBoundary (BitReader br)
 
static int BrotliDecompressedSize (Stream buffer)
 

Static Package Functions

static MetaBlockLength DecodeMetaBlockLength (BitReader br)
 
static int ReadBlockLength (HuffmanCode[] table, int index, BitReader br)
 
static int TranslateShortCodes (int code, byte[] ringbuffer, int index)
 
static void MoveToFront (byte[] v, int index)
 
static void InverseMoveToFrontTransform (byte[] v, int v_len)
 
static ContextMap DecodeContextMap (int context_map_size, BitReader br)
 
static void DecodeBlockType (int max_block_type, HuffmanCode[] trees, int tree_type, byte[] block_types, byte[] ringbuffers, byte[] indexes, BitReader br)
 
static void CopyUncompressedBlockToOutput (OutputStream output, int len, int pos, byte[] ringbuffer, int ringbuffer_mask, BitReader br)
 
static void BrotliDecompress (Stream input, OutputStream output)
 

Static Package Attributes

static readonly ushort[] kMaxHuffmanTableSize
 

Private Attributes

const int kDefaultCodeLength = 8
 
const int kCodeLengthRepeatCode = 16
 
const int kNumLiteralCodes = 256
 
const int kNumInsertAndCopyCodes = 704
 
const int kNumBlockLengthCodes = 26
 
const int kLiteralContextBits = 6
 
const int kDistanceContextBits = 2
 
const int HUFFMAN_TABLE_BITS = 8
 
const int HUFFMAN_TABLE_MASK = 0xff
 
const int HUFFMAN_MAX_TABLE_SIZE = 1080
 
const int CODE_LENGTH_CODES = 18
 
const int NUM_DISTANCE_SHORT_CODES = 16
 

Static Private Attributes

static readonly byte[] kCodeLengthCodeOrder
 
static readonly byte[] kDistanceShortCodeIndexOffset
 
static readonly sbyte[] kDistanceShortCodeValueOffset
 

Member Function Documentation

static void Brotli.Decoder.BrotliDecompress ( Stream  input,
OutputStream  output 
)
inlinestaticpackage
static int Brotli.Decoder.BrotliDecompressedSize ( Stream  buffer)
inlinestatic
static void Brotli.Decoder.CopyUncompressedBlockToOutput ( OutputStream  output,
int  len,
int  pos,
byte[]  ringbuffer,
int  ringbuffer_mask,
BitReader  br 
)
inlinestaticpackage
static void Brotli.Decoder.DecodeBlockType ( int  max_block_type,
HuffmanCode[]  trees,
int  tree_type,
byte[]  block_types,
byte[]  ringbuffers,
byte[]  indexes,
BitReader  br 
)
inlinestaticpackage
static ContextMap Brotli.Decoder.DecodeContextMap ( int  context_map_size,
BitReader  br 
)
inlinestaticpackage
static MetaBlockLength Brotli.Decoder.DecodeMetaBlockLength ( BitReader  br)
inlinestaticpackage
static byte Brotli.Decoder.DecodeVarLenUint8 ( BitReader  br)
inlinestatic
static int Brotli.Decoder.DecodeWindowBits ( BitReader  br)
inlinestatic
static void Brotli.Decoder.InverseMoveToFrontTransform ( byte[]  v,
int  v_len 
)
inlinestaticpackage
static bool Brotli.Decoder.JumpToByteBoundary ( BitReader  br)
inlinestatic
static void Brotli.Decoder.MoveToFront ( byte[]  v,
int  index 
)
inlinestaticpackage
static int Brotli.Decoder.ReadBlockLength ( HuffmanCode[]  table,
int  index,
BitReader  br 
)
inlinestaticpackage
static int Brotli.Decoder.ReadHuffmanCode ( int  alphabet_size,
HuffmanCode[]  tables,
int  table,
BitReader  br 
)
inlinestatic
static void Brotli.Decoder.ReadHuffmanCodeLengths ( byte[]  code_length_code_lengths,
int  num_symbols,
byte[]  code_lengths,
BitReader  br 
)
inlinestatic
static ushort Brotli.Decoder.ReadSymbol ( HuffmanCode[]  table,
int  index,
BitReader  br 
)
inlinestatic
static int Brotli.Decoder.TranslateShortCodes ( int  code,
byte[]  ringbuffer,
int  index 
)
inlinestaticpackage

Member Data Documentation

const int Brotli.Decoder.CODE_LENGTH_CODES = 18
private
const int Brotli.Decoder.HUFFMAN_MAX_TABLE_SIZE = 1080
private
const int Brotli.Decoder.HUFFMAN_TABLE_BITS = 8
private
const int Brotli.Decoder.HUFFMAN_TABLE_MASK = 0xff
private
readonly byte [] Brotli.Decoder.kCodeLengthCodeOrder
staticprivate
Initial value:
= new byte[]{
1, 2, 3, 4, 0, 5, 17, 6, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15,
}
const int Brotli.Decoder.kCodeLengthRepeatCode = 16
private
const int Brotli.Decoder.kDefaultCodeLength = 8
private
const int Brotli.Decoder.kDistanceContextBits = 2
private
readonly byte [] Brotli.Decoder.kDistanceShortCodeIndexOffset
staticprivate
Initial value:
= new byte[]{
3, 2, 1, 0, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2
}
readonly sbyte [] Brotli.Decoder.kDistanceShortCodeValueOffset
staticprivate
Initial value:
= new sbyte[]{
0, 0, 0, 0, -1, 1, -2, 2, -3, 3, -1, 1, -2, 2, -3, 3
}
const int Brotli.Decoder.kLiteralContextBits = 6
private
readonly ushort [] Brotli.Decoder.kMaxHuffmanTableSize
staticpackage
Initial value:
= new ushort[]{
256, 402, 436, 468, 500, 534, 566, 598, 630, 662, 694, 726, 758, 790, 822,
854, 886, 920, 952, 984, 1016, 1048, 1080
}
const int Brotli.Decoder.kNumBlockLengthCodes = 26
private
const int Brotli.Decoder.kNumInsertAndCopyCodes = 704
private
const int Brotli.Decoder.kNumLiteralCodes = 256
private
const int Brotli.Decoder.NUM_DISTANCE_SHORT_CODES = 16
private