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

Function lodepng_crc32

src/lodepng.cpp:2303–2313  ·  view source on GitHub ↗

Return the CRC of the bytes buf[0..len-1].*/

Source from the content-addressed store, hash-verified

2301
2302/*Return the CRC of the bytes buf[0..len-1].*/
2303unsigned lodepng_crc32(const unsigned char* buf, size_t len)
2304{
2305 unsigned c = 0xffffffffL;
2306 size_t n;
2307
2308 for(n = 0; n < len; n++)
2309 {
2310 c = lodepng_crc32_table[(c ^ buf[n]) & 0xff] ^ (c >> 8);
2311 }
2312 return c ^ 0xffffffffL;
2313}
2314
2315/* ////////////////////////////////////////////////////////////////////////// */
2316/* / Reading and writing single bits and bytes from/to stream for LodePNG / */

Callers 3

lodepng_chunk_check_crcFunction · 0.85
lodepng_inspectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected