ReactOS
0.4.15-dev-1638-gc0caa5c
|
Go to the source code of this file.
Classes | |
struct | BIT_CStream_t |
struct | BIT_DStream_t |
Macros | |
#define | STREAM_ACCUMULATOR_MIN_32 25 |
#define | STREAM_ACCUMULATOR_MIN_64 57 |
#define | STREAM_ACCUMULATOR_MIN ((U32)(MEM_32bits() ? STREAM_ACCUMULATOR_MIN_32 : STREAM_ACCUMULATOR_MIN_64)) |
#define | BIT_MASK_SIZE (sizeof(BIT_mask) / sizeof(BIT_mask[0])) |
Enumerations | |
enum | BIT_DStream_status { BIT_DStream_unfinished = 0, BIT_DStream_endOfBuffer = 1, BIT_DStream_completed = 2, BIT_DStream_overflow = 3 } |
Variables | |
static const unsigned | BIT_mask [] |
Definition at line 190 of file bitstream.h.
#define STREAM_ACCUMULATOR_MIN ((U32)(MEM_32bits() ? STREAM_ACCUMULATOR_MIN_32 : STREAM_ACCUMULATOR_MIN_64)) |
Definition at line 64 of file bitstream.h.
#define STREAM_ACCUMULATOR_MIN_32 25 |
Definition at line 62 of file bitstream.h.
#define STREAM_ACCUMULATOR_MIN_64 57 |
Definition at line 63 of file bitstream.h.
Enumerator | |
---|---|
BIT_DStream_unfinished | |
BIT_DStream_endOfBuffer | |
BIT_DStream_completed | |
BIT_DStream_overflow |
Definition at line 116 of file bitstream.h.
MEM_STATIC void BIT_addBits | ( | BIT_CStream_t * | bitC, |
size_t | value, | ||
unsigned | nbBits | ||
) |
BIT_addBits() : can add up to 31 bits into bitC
. Note : does not check for register overflow !
Definition at line 214 of file bitstream.h.
Referenced by ZSTD_encodeSequences_body().
MEM_STATIC void BIT_addBitsFast | ( | BIT_CStream_t * | bitC, |
size_t | value, | ||
unsigned | nbBits | ||
) |
BIT_addBitsFast() : works only if value
is clean, meaning all high bits above nbBits are 0
Definition at line 227 of file bitstream.h.
Referenced by BIT_closeCStream(), and HUF_encodeSymbol().
MEM_STATIC size_t BIT_closeCStream | ( | BIT_CStream_t * | bitC | ) |
Definition at line 269 of file bitstream.h.
Referenced by FSE_compress_usingCTable_generic(), HUF_compress1X_usingCTable_internal_body(), and ZSTD_encodeSequences_body().
MEM_STATIC unsigned BIT_endOfDStream | ( | const BIT_DStream_t * | DStream | ) |
Definition at line 446 of file bitstream.h.
Referenced by HUF_decompress1X1_usingDTable_internal_body(), HUF_decompress1X2_usingDTable_internal_body(), HUF_decompress4X1_usingDTable_internal_body(), and HUF_decompress4X2_usingDTable_internal_body().
MEM_STATIC void BIT_flushBits | ( | BIT_CStream_t * | bitC | ) |
BIT_flushBits() : assumption : bitContainer has not overflowed safe version; check for buffer overflow, and prevents it. note : does not signal buffer overflow. overflow will be revealed later on using BIT_closeCStream()
Definition at line 255 of file bitstream.h.
Referenced by BIT_closeCStream(), and ZSTD_encodeSequences_body().
MEM_STATIC void BIT_flushBitsFast | ( | BIT_CStream_t * | bitC | ) |
BIT_flushBitsFast() : assumption : bitContainer has not overflowed unsafe version; does not check buffer overflow
Definition at line 239 of file bitstream.h.
MEM_STATIC size_t BIT_getLowerBits | ( | size_t | bitContainer, |
U32 const | nbBits | ||
) |
Definition at line 348 of file bitstream.h.
MEM_STATIC size_t BIT_getUpperBits | ( | size_t | bitContainer, |
U32 const | start | ||
) |
Definition at line 335 of file bitstream.h.
MEM_STATIC unsigned BIT_highbit32 | ( | U32 | val | ) |
Definition at line 156 of file bitstream.h.
Referenced by BIT_initDStream(), FSE_buildCTable_wksp(), FSE_buildDTable(), FSE_minTableLog(), FSE_optimalTableLog_internal(), HUF_readStats(), HUF_setMaxHeight(), HUF_sort(), and ZSTD_buildFSETable().
MEM_STATIC size_t BIT_initCStream | ( | BIT_CStream_t * | bitC, |
void * | startPtr, | ||
size_t | dstCapacity | ||
) |
BIT_initCStream() : dstCapacity
must be > sizeof(size_t)
Definition at line 199 of file bitstream.h.
Referenced by FSE_compress_usingCTable_generic(), HUF_compress1X_usingCTable_internal_body(), and ZSTD_encodeSequences_body().
MEM_STATIC size_t BIT_initDStream | ( | BIT_DStream_t * | bitD, |
const void * | srcBuffer, | ||
size_t | srcSize | ||
) |
BIT_initDStream() : Initialize a BIT_DStream_t. bitD
: a pointer to an already allocated BIT_DStream_t structure. srcSize
must be the exact size of the bitStream, in bytes.
Definition at line 287 of file bitstream.h.
Referenced by FSE_decompress_usingDTable_generic(), HUF_decompress1X1_usingDTable_internal_body(), HUF_decompress1X2_usingDTable_internal_body(), HUF_decompress4X1_usingDTable_internal_body(), HUF_decompress4X2_usingDTable_internal_body(), ZSTD_decompressSequences_body(), and ZSTD_decompressSequencesLong_body().
MEM_STATIC size_t BIT_lookBits | ( | const BIT_DStream_t * | bitD, |
U32 | nbBits | ||
) |
BIT_lookBits() : Provides next n bits from local register. local register is not modified. On 32-bits, maxNbBits==24. On 64-bits, maxNbBits==56.
Definition at line 360 of file bitstream.h.
Referenced by BIT_readBits().
MEM_STATIC size_t BIT_lookBitsFast | ( | const BIT_DStream_t * | bitD, |
U32 | nbBits | ||
) |
BIT_lookBitsFast() : unsafe version; only works if nbBits >= 1
Definition at line 376 of file bitstream.h.
Referenced by BIT_readBitsFast(), HUF_decodeLastSymbolX2(), HUF_decodeSymbolX1(), and HUF_decodeSymbolX2().
MEM_STATIC size_t BIT_readBits | ( | BIT_DStream_t * | bitD, |
unsigned | nbBits | ||
) |
Referenced by ZSTD_initFseState(), and ZSTD_updateFseState().
MEM_STATIC size_t BIT_readBits | ( | BIT_DStream_t * | bitD, |
U32 | nbBits | ||
) |
BIT_readBits() : Read (consume) next n bits from local register and update. Pay attention to not read more than nbBits contained into local register.
Definition at line 392 of file bitstream.h.
MEM_STATIC size_t BIT_readBitsFast | ( | BIT_DStream_t * | bitD, |
unsigned | nbBits | ||
) |
Referenced by ZSTD_decodeSequence(), and ZSTD_decodeSequenceLong().
MEM_STATIC size_t BIT_readBitsFast | ( | BIT_DStream_t * | bitD, |
U32 | nbBits | ||
) |
BIT_readBitsFast() : unsafe version; only works only if nbBits >= 1
Definition at line 401 of file bitstream.h.
MEM_STATIC BIT_DStream_status BIT_reloadDStream | ( | BIT_DStream_t * | bitD | ) |
BIT_reloadDStream() : Refill bitD
from buffer previously set in BIT_initDStream() . This function is safe, it guarantees it will not read beyond src buffer.
BIT_DStream_t
internal register. when status == BIT_DStream_unfinished, internal register is filled with at least 25 or 57 bits Definition at line 414 of file bitstream.h.
Referenced by FSE_decompress_usingDTable_generic(), HUF_decodeStreamX1(), HUF_decodeStreamX2(), HUF_decompress4X1_usingDTable_internal_body(), HUF_decompress4X2_usingDTable_internal_body(), ZSTD_decodeSequence(), ZSTD_decodeSequenceLong(), ZSTD_decompressSequences_body(), ZSTD_decompressSequencesLong_body(), and ZSTD_initFseState().
MEM_STATIC void BIT_skipBits | ( | BIT_DStream_t * | bitD, |
U32 | nbBits | ||
) |
Definition at line 383 of file bitstream.h.
Referenced by BIT_readBits(), BIT_readBitsFast(), HUF_decodeLastSymbolX2(), HUF_decodeSymbolX1(), and HUF_decodeSymbolX2().
Definition at line 183 of file bitstream.h.
Referenced by BIT_addBits(), BIT_getLowerBits(), and BIT_getMiddleBits().