#ifndef BROTLI_DEC_BIT_READER_H_
#define BROTLI_DEC_BIT_READER_H_
#include <string.h>
#include <brotli/types.h>
#include "../common/constants.h"
#include "../common/platform.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#define BROTLI_SHORT_FILL_BIT_WINDOW_READ …
#define BROTLI_FAST_INPUT_SLACK …
BROTLI_INTERNAL extern const brotli_reg_t kBrotliBitMask[33];
static BROTLI_INLINE brotli_reg_t BitMask(brotli_reg_t n) { … }
BrotliBitReader;
BrotliBitReaderState;
BROTLI_INTERNAL void BrotliInitBitReader(BrotliBitReader* br);
BROTLI_INTERNAL BROTLI_BOOL BrotliWarmupBitReader(BrotliBitReader* br);
BROTLI_INTERNAL BROTLI_NOINLINE BROTLI_BOOL BrotliSafeReadBits32Slow(
BrotliBitReader* br, brotli_reg_t n_bits, brotli_reg_t* val);
static BROTLI_INLINE size_t
BrotliBitReaderGetAvailIn(BrotliBitReader* const br) { … }
static BROTLI_INLINE void BrotliBitReaderSaveState(
BrotliBitReader* const from, BrotliBitReaderState* to) { … }
static BROTLI_INLINE void BrotliBitReaderSetInput(
BrotliBitReader* const br, const uint8_t* next_in, size_t avail_in) { … }
static BROTLI_INLINE void BrotliBitReaderRestoreState(
BrotliBitReader* const to, BrotliBitReaderState* from) { … }
static BROTLI_INLINE brotli_reg_t BrotliGetAvailableBits(
const BrotliBitReader* br) { … }
static BROTLI_INLINE size_t BrotliGetRemainingBytes(BrotliBitReader* br) { … }
static BROTLI_INLINE BROTLI_BOOL BrotliCheckInputAmount(
BrotliBitReader* const br) { … }
static BROTLI_INLINE brotli_reg_t BrotliBitReaderLoadBits(brotli_reg_t val,
brotli_reg_t new_bits,
brotli_reg_t count,
brotli_reg_t offset) { … }
static BROTLI_INLINE void BrotliFillBitWindow(
BrotliBitReader* const br, brotli_reg_t n_bits) { … }
static BROTLI_INLINE void BrotliFillBitWindow16(BrotliBitReader* const br) { … }
static BROTLI_INLINE BROTLI_BOOL BrotliPullByte(BrotliBitReader* const br) { … }
static BROTLI_INLINE brotli_reg_t BrotliGetBitsUnmasked(
BrotliBitReader* const br) { … }
static BROTLI_INLINE brotli_reg_t BrotliGet16BitsUnmasked(
BrotliBitReader* const br) { … }
static BROTLI_INLINE brotli_reg_t BrotliGetBits(
BrotliBitReader* const br, brotli_reg_t n_bits) { … }
static BROTLI_INLINE BROTLI_BOOL BrotliSafeGetBits(
BrotliBitReader* const br, brotli_reg_t n_bits, brotli_reg_t* val) { … }
static BROTLI_INLINE void BrotliDropBits(
BrotliBitReader* const br, brotli_reg_t n_bits) { … }
static BROTLI_INLINE void BrotliBitReaderNormalize(BrotliBitReader* br) { … }
static BROTLI_INLINE void BrotliBitReaderUnload(BrotliBitReader* br) { … }
static BROTLI_INLINE void BrotliTakeBits(BrotliBitReader* const br,
brotli_reg_t n_bits,
brotli_reg_t* val) { … }
static BROTLI_INLINE brotli_reg_t BrotliReadBits24(
BrotliBitReader* const br, brotli_reg_t n_bits) { … }
static BROTLI_INLINE brotli_reg_t BrotliReadBits32(
BrotliBitReader* const br, brotli_reg_t n_bits) { … }
static BROTLI_INLINE BROTLI_BOOL BrotliSafeReadBits(
BrotliBitReader* const br, brotli_reg_t n_bits, brotli_reg_t* val) { … }
static BROTLI_INLINE BROTLI_BOOL BrotliSafeReadBits32(
BrotliBitReader* const br, brotli_reg_t n_bits, brotli_reg_t* val) { … }
static BROTLI_INLINE BROTLI_BOOL BrotliJumpToByteBoundary(BrotliBitReader* br) { … }
static BROTLI_INLINE void BrotliDropBytes(BrotliBitReader* br, size_t num) { … }
static BROTLI_INLINE void BrotliCopyBytes(uint8_t* dest,
BrotliBitReader* br, size_t num) { … }
BROTLI_UNUSED_FUNCTION void BrotliBitReaderSuppressUnusedFunctions(void) { … }
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif