MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / countZeros

Function countZeros

src/lodepng.cpp:1403–1412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1401}
1402
1403static unsigned countZeros(const unsigned char* data, size_t size, size_t pos)
1404{
1405 const unsigned char* start = data + pos;
1406 const unsigned char* end = start + MAX_SUPPORTED_DEFLATE_LENGTH;
1407 if(end > data + size) end = data + size;
1408 data = start;
1409 while (data != end && *data == 0) data++;
1410 /*subtracting two addresses returned as 32-bit number (max value is MAX_SUPPORTED_DEFLATE_LENGTH)*/
1411 return (unsigned)(data - start);
1412}
1413
1414/*wpos = pos & (windowsize - 1)*/
1415static void updateHashChain(Hash* hash, size_t wpos, int hashval)

Callers 1

encodeLZ77Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected