MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / decompress

Function decompress

samples/shared/lodepng.cpp:5909–5921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5907#ifdef LODEPNG_COMPILE_ZLIB
5908#ifdef LODEPNG_COMPILE_DECODER
5909unsigned decompress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize,
5910 const LodePNGDecompressSettings& settings)
5911{
5912 unsigned char* buffer = 0;
5913 size_t buffersize = 0;
5914 unsigned error = zlib_decompress(&buffer, &buffersize, in, insize, &settings);
5915 if(buffer)
5916 {
5917 out.insert(out.end(), &buffer[0], &buffer[buffersize]);
5918 lodepng_free(buffer);
5919 }
5920 return error;
5921}
5922
5923unsigned decompress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in,
5924 const LodePNGDecompressSettings& settings)

Callers

nothing calls this directly

Calls 5

zlib_decompressFunction · 0.85
lodepng_freeFunction · 0.85
endMethod · 0.80
emptyMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected