MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / compress

Function compress

src/lodepng.cpp:6087–6099  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6085
6086#ifdef LODEPNG_COMPILE_ENCODER
6087unsigned compress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize,
6088 const LodePNGCompressSettings& settings)
6089{
6090 unsigned char* buffer = 0;
6091 size_t buffersize = 0;
6092 unsigned error = zlib_compress(&buffer, &buffersize, in, insize, &settings);
6093 if(buffer)
6094 {
6095 out.insert(out.end(), &buffer[0], &buffer[buffersize]);
6096 lodepng_free(buffer);
6097 }
6098 return error;
6099}
6100
6101unsigned compress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in,
6102 const LodePNGCompressSettings& settings)

Callers

nothing calls this directly

Calls 3

zlib_compressFunction · 0.85
lodepng_freeFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected