Get bits without advancing the bit pointer. Must have enough bits available with ensureBits. Max nbits is 31. */
| 566 | |
| 567 | /* Get bits without advancing the bit pointer. Must have enough bits available with ensureBits. Max nbits is 31. */ |
| 568 | static unsigned peekBits(LodePNGBitReader* reader, size_t nbits) { |
| 569 | /* The shift allows nbits to be only up to 31. */ |
| 570 | return reader->buffer & ((1u << nbits) - 1u); |
| 571 | } |
| 572 | |
| 573 | /* Must have enough bits available with ensureBits */ |
| 574 | static void advanceBits(LodePNGBitReader* reader, size_t nbits) { |
no outgoing calls
no test coverage detected