| Modifier and Type | Field and Description |
|---|---|
| pack-priv long | accumulator
Pre-fetched bits. |
| pack-priv int | bitOffset
Current bit-reading position in accumulator. |
| private static final int | |
| private static final int | |
| private final byte[] | |
| private static final int | CAPACITY
Input byte buffer, consist of a ring-buffer and a "slack" region where bytes from the start of the ring-buffer are copied. |
| private boolean | endOfStreamReached
Input stream is finished. |
| private InputStream | |
| private static final int | |
| private final int[] | |
| private int | intOffset
Offset of next item in intBuffer. |
| private final IntReader | |
| private static final int | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static void | |
| pack-priv static void | |
| pack-priv static void | |
| pack-priv static void | fillBitWindow(BitReader br)
Advances the Read buffer by 5 bytes to make room for reading next 24 bits. |
| pack-priv static void | |
| pack-priv static int | |
| pack-priv static void | |
| private static void | |
| pack-priv static int | |
| pack-priv static void | |
| pack-priv static void |
| accumulator | back to summary |
|---|---|
| pack-priv long accumulator Pre-fetched bits. | |
| bitOffset | back to summary |
|---|---|
| pack-priv int bitOffset Current bit-reading position in accumulator. | |
| BYTE_BUFFER_SIZE | back to summary |
|---|---|
| private static final int BYTE_BUFFER_SIZE | |
| BYTE_READ_SIZE | back to summary |
|---|---|
| private static final int BYTE_READ_SIZE | |
| byteBuffer | back to summary |
|---|---|
| private final byte[] byteBuffer | |
| CAPACITY | back to summary |
|---|---|
| private static final int CAPACITY Input byte buffer, consist of a ring-buffer and a "slack" region where bytes from the start of the ring-buffer are copied. | |
| endOfStreamReached | back to summary |
|---|---|
| private boolean endOfStreamReached Input stream is finished. | |
| input | back to summary |
|---|---|
| private InputStream input | |
| INT_BUFFER_SIZE | back to summary |
|---|---|
| private static final int INT_BUFFER_SIZE | |
| intBuffer | back to summary |
|---|---|
| private final int[] intBuffer | |
| intOffset | back to summary |
|---|---|
| private int intOffset Offset of next item in intBuffer. | |
| intReader | back to summary |
|---|---|
| private final IntReader intReader | |
| SLACK | back to summary |
|---|---|
| private static final int SLACK | |
| tailBytes | back to summary |
|---|---|
| private int tailBytes | |
| BitReader | back to summary |
|---|---|
| pack-priv BitReader() | |
| checkHealth | back to summary |
|---|---|
| pack-priv static void checkHealth(BitReader br, boolean endOfStream) | |
| close | back to summary |
|---|---|
| pack-priv static void close(BitReader br) throws IOException | |
| copyBytes | back to summary |
|---|---|
| pack-priv static void copyBytes(BitReader br, byte[] data, int offset, int length) | |
| fillBitWindow | back to summary |
|---|---|
| pack-priv static void fillBitWindow(BitReader br) Advances the Read buffer by 5 bytes to make room for reading next 24 bits. | |
| init | back to summary |
|---|---|
| pack-priv static void init(BitReader br, InputStream input) Initialize bit reader. Initialisation turns bit reader to a ready state. Also a number of bytes is prefetched to accumulator. Because of that this method may block until enough data could be read from input.
| |
| intAvailable | back to summary |
|---|---|
| pack-priv static int intAvailable(BitReader br) | |
| jumpToByteBoundary | back to summary |
|---|---|
| pack-priv static void jumpToByteBoundary(BitReader br) | |
| prepare | back to summary |
|---|---|
| private static void prepare(BitReader br) | |
| readBits | back to summary |
|---|---|
| pack-priv static int readBits(BitReader br, int n) Reads the specified number of bits from Read Buffer. | |
| readMoreInput | back to summary |
|---|---|
| pack-priv static void readMoreInput(BitReader br) 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. | |
| reload | back to summary |
|---|---|
| pack-priv static void reload(BitReader br) | |