| 6289 | #ifdef LODEPNG_COMPILE_ZLIB |
| 6290 | #ifdef LODEPNG_COMPILE_DECODER |
| 6291 | unsigned 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 | |
| 6303 | unsigned decompress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in, |
| 6304 | const LodePNGDecompressSettings& settings) { |
nothing calls this directly
no test coverage detected