MCPcopy
hub / github.com/google/brotli / decodeVarLenUnsignedByte

Method decodeVarLenUnsignedByte

java/org/brotli/dec/Decode.java:354–364  ·  view source on GitHub ↗

Decodes a number in the range [0..255], by reading 1 - 11 bits.

(State s)

Source from the content-addressed store, hash-verified

352 * Decodes a number in the range [0..255], by reading 1 - 11 bits.
353 */
354 private static int decodeVarLenUnsignedByte(State s) {
355 BitReader.fillBitWindow(s);
356 if (BitReader.readFewBits(s, 1) != 0) {
357 final int n = BitReader.readFewBits(s, 3);
358 if (n == 0) {
359 return 1;
360 }
361 return BitReader.readFewBits(s, n) + (1 << n);
362 }
363 return 0;
364 }
365
366 private static int decodeMetaBlockLength(State s) {
367 BitReader.fillBitWindow(s);

Callers 2

decodeContextMapMethod · 0.95

Calls 2

fillBitWindowMethod · 0.95
readFewBitsMethod · 0.95

Tested by

no test coverage detected