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

Function decodeVarLenUnsignedByte

js/decode.ts:173–186  ·  view source on GitHub ↗
(s: State)

Source from the content-addressed store, hash-verified

171 return 0;
172}
173function decodeVarLenUnsignedByte(s: State): number {
174 if (s.bitOffset >= 16) {
175 s.accumulator32 = (s.shortBuffer[s.halfOffset++] << 16) | (s.accumulator32 >>> 16);
176 s.bitOffset -= 16;
177 }
178 if (readFewBits(s, 1) !== 0) {
179 const n: number = readFewBits(s, 3);
180 if (n === 0) {
181 return 1;
182 }
183 return readFewBits(s, n) + (1 << n);
184 }
185 return 0;
186}
187function decodeMetaBlockLength(s: State): number {
188 if (s.bitOffset >= 16) {
189 s.accumulator32 = (s.shortBuffer[s.halfOffset++] << 16) | (s.accumulator32 >>> 16);

Callers 2

decodeContextMapFunction · 0.70

Calls 1

readFewBitsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…