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

Function decompress

depends/lodepng/lodepng.cpp:6291–6301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6289#ifdef LODEPNG_COMPILE_ZLIB
6290#ifdef LODEPNG_COMPILE_DECODER
6291unsigned decompress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize,
6292 const LodePNGDecompressSettings& settings) {
6293 unsigned char* buffer = 0;
6294 size_t buffersize = 0;
6295 unsigned error = zlib_decompress(&buffer, &buffersize, 0, in, insize, &settings);
6296 if(buffer) {
6297 out.insert(out.end(), &buffer[0], &buffer[buffersize]);
6298 lodepng_free(buffer);
6299 }
6300 return error;
6301}
6302
6303unsigned decompress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in,
6304 const LodePNGDecompressSettings& settings) {

Callers

nothing calls this directly

Calls 6

zlib_decompressFunction · 0.85
lodepng_freeFunction · 0.85
insertMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected