Exemplo n.º 1
0
static SquashStatus
squash_pithy_compress_buffer (SquashCodec* codec,
                              size_t* compressed_size,
                              uint8_t compressed[SQUASH_ARRAY_PARAM(*compressed_size)],
                              size_t uncompressed_size,
                              const uint8_t uncompressed[SQUASH_ARRAY_PARAM(uncompressed_size)],
                              SquashOptions* options) {
  const int level = squash_options_get_int_at (options, codec, SQUASH_PITHY_OPT_LEVEL);
  *compressed_size = pithy_Compress ((const char*) uncompressed, uncompressed_size, (char*) compressed, *compressed_size, level);
  return (*compressed_size != 0) ? SQUASH_OK : SQUASH_FAILED;
}
Exemplo n.º 2
0
int64_t lzbench_pithy_compress(char *inbuf, size_t insize, char *outbuf, size_t outsize, size_t level, size_t, char*)
{
	return pithy_Compress(inbuf, insize, outbuf, outsize, level);
}