Detailed Description

Bit reading helpers.

Public Member Functions

 BitReader (Stream input)
 
bool Reset ()
 
uint ReadBits (int n_bits)
 

Public Attributes

const int READ_SIZE = 4096
 
const int IBUF_SIZE = (2 * READ_SIZE + 32)
 
const int IBUF_MASK = (2 * READ_SIZE - 1)
 
byte[] buf_
 
Stream input_
 
int buf_ptr_
 
uint val_
 
int pos_
 
int bit_pos_
 
int bit_end_pos_
 
bool eos_
 

Static Public Attributes

static readonly uint[] kBitMask
 

Package Functions

void ReadMoreInput ()
 
void FillBitWindow ()
 

Constructor & Destructor Documentation

Brotli.BitReader.BitReader ( Stream  input)
inline

Member Function Documentation

void Brotli.BitReader.FillBitWindow ( )
inlinepackage
uint Brotli.BitReader.ReadBits ( int  n_bits)
inline
void Brotli.BitReader.ReadMoreInput ( )
inlinepackage
bool Brotli.BitReader.Reset ( )
inline

Member Data Documentation

int Brotli.BitReader.bit_end_pos_
int Brotli.BitReader.bit_pos_
byte [] Brotli.BitReader.buf_
int Brotli.BitReader.buf_ptr_
bool Brotli.BitReader.eos_
const int Brotli.BitReader.IBUF_MASK = (2 * READ_SIZE - 1)
const int Brotli.BitReader.IBUF_SIZE = (2 * READ_SIZE + 32)
Stream Brotli.BitReader.input_
readonly uint [] Brotli.BitReader.kBitMask
static
Initial value:
= new uint[]{
0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767,
65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215
}
int Brotli.BitReader.pos_
const int Brotli.BitReader.READ_SIZE = 4096
uint Brotli.BitReader.val_