| 6308 | |
| 6309 | #ifdef LODEPNG_COMPILE_ENCODER |
| 6310 | unsigned compress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize, |
| 6311 | const LodePNGCompressSettings& settings) { |
| 6312 | unsigned char* buffer = 0; |
| 6313 | size_t buffersize = 0; |
| 6314 | unsigned error = zlib_compress(&buffer, &buffersize, in, insize, &settings); |
| 6315 | if(buffer) { |
| 6316 | out.insert(out.end(), &buffer[0], &buffer[buffersize]); |
| 6317 | lodepng_free(buffer); |
| 6318 | } |
| 6319 | return error; |
| 6320 | } |
| 6321 | |
| 6322 | unsigned compress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in, |
| 6323 | const LodePNGCompressSettings& settings) { |
nothing calls this directly
no test coverage detected