MCPcopy Create free account
hub / github.com/creatale/node-dv / decompress

Function decompress

deps/lodepng/lodepng.cpp:6104–6116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6102#ifdef LODEPNG_COMPILE_ZLIB
6103#ifdef LODEPNG_COMPILE_DECODER
6104unsigned decompress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize,
6105 const LodePNGDecompressSettings& settings)
6106{
6107 unsigned char* buffer = 0;
6108 size_t buffersize = 0;
6109 unsigned error = zlib_decompress(&buffer, &buffersize, in, insize, &settings);
6110 if(buffer)
6111 {
6112 out.insert(out.end(), &buffer[0], &buffer[buffersize]);
6113 lodepng_free(buffer);
6114 }
6115 return error;
6116}
6117
6118unsigned decompress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in,
6119 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