Package org.brotli.dec
Class BitReader
java.lang.Object
org.brotli.dec.BitReader
Bit reading helpers.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static void
(package private) static void
bytesToNibbles
(State s, int byteLen) Translates bytes to halves (int/short).(package private) static void
checkHealth
(State s, int endOfStream) (package private) static void
copyRawBytes
(State s, byte[] data, int offset, int length) (package private) static void
(package private) static void
(package private) static void
(package private) static int
(package private) static void
(package private) static void
(package private) static int
private static void
(package private) static int
(package private) static int
readFewBits
(State s, int n) Fetches bits from accumulator.private static int
readManyBits
(State s, int n) (package private) static void
Fills up the input buffer.(package private) static void
-
Field Details
-
LOG_BITNESS
private static final int LOG_BITNESS -
DEBUG
private static final int DEBUG -
BITNESS
static final int BITNESS -
BYTENESS
private static final int BYTENESS -
CAPACITY
private static final int CAPACITY- See Also:
-
SLACK
private static final int SLACK- See Also:
-
BUFFER_SIZE
private static final int BUFFER_SIZE- See Also:
-
SAFEGUARD
private static final int SAFEGUARD- See Also:
-
WATERLINE
private static final int WATERLINE- See Also:
-
HALF_BITNESS
private static final int HALF_BITNESS -
HALF_SIZE
private static final int HALF_SIZE -
HALVES_CAPACITY
private static final int HALVES_CAPACITY -
HALF_BUFFER_SIZE
private static final int HALF_BUFFER_SIZE -
HALF_WATERLINE
private static final int HALF_WATERLINE -
LOG_HALF_SIZE
private static final int LOG_HALF_SIZE
-
-
Constructor Details
-
BitReader
BitReader()
-
-
Method Details
-
readMoreInput
Fills up the input buffer.No-op if there are at least 36 bytes present after current position.
After encountering the end of the input stream, 64 additional zero bytes are copied to the buffer.
-
doReadMoreInput
-
checkHealth
-
assertAccumulatorHealthy
-
fillBitWindow
-
doFillBitWindow
-
peekBits
-
readFewBits
Fetches bits from accumulator. WARNING: accumulator MUST contain at least the specified amount of bits, otherwise BitReader will become broken. -
readBits
-
readManyBits
-
initBitReader
-
prepare
-
reload
-
jumpToByteBoundary
-
halfAvailable
-
copyRawBytes
-
bytesToNibbles
Translates bytes to halves (int/short).
-