MCPcopy Create free account
hub / github.com/DFHack/dfhack / peekBits

Function peekBits

depends/lodepng/lodepng.cpp:568–571  ·  view source on GitHub ↗

Get bits without advancing the bit pointer. Must have enough bits available with ensureBits. Max nbits is 31. */

Source from the content-addressed store, hash-verified

566
567/* Get bits without advancing the bit pointer. Must have enough bits available with ensureBits. Max nbits is 31. */
568static 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 */
574static void advanceBits(LodePNGBitReader* reader, size_t nbits) {

Callers 2

readBitsFunction · 0.85
huffmanDecodeSymbolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected