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

Function setBitOfReversedStream

depends/lodepng/lodepng.cpp:2455–2460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2453}
2454
2455static void setBitOfReversedStream(size_t* bitpointer, unsigned char* bitstream, unsigned char bit) {
2456 /*the current bit in bitstream may be 0 or 1 for this to work*/
2457 if(bit == 0) bitstream[(*bitpointer) >> 3u] &= (unsigned char)(~(1u << (7u - ((*bitpointer) & 7u))));
2458 else bitstream[(*bitpointer) >> 3u] |= (1u << (7u - ((*bitpointer) & 7u)));
2459 ++(*bitpointer);
2460}
2461
2462/* ////////////////////////////////////////////////////////////////////////// */
2463/* / PNG chunks / */

Callers 4

Adam7_deinterlaceFunction · 0.85
removePaddingBitsFunction · 0.85
addPaddingBitsFunction · 0.85
Adam7_interlaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected