* Reads a code of given length and at given index in an array of bits
(rawbits: boolean[], startIndex: number, length: number)
| 331 | * Reads a code of given length and at given index in an array of bits |
| 332 | */ |
| 333 | private static readCode(rawbits: boolean[], startIndex: number, length: number): number { |
| 334 | let res = 0; |
| 335 | for (let i = startIndex; i < startIndex + length; i++) { |
| 336 | res <<= 1; |
| 337 | if (rawbits[i]) { |
| 338 | res |= 0x01; |
| 339 | } |
| 340 | } |
| 341 | return res; |
| 342 | } |
| 343 | |
| 344 | /** |
| 345 | * Reads a code of length 8 in an array of bits, padding with zeros |
no outgoing calls
no test coverage detected