-typedef int (compress_t)(const void *src, uint64_t src_size, void *dst, uint64_t *dst_size);
+typedef int (compress_t)(const void *src, uint64_t src_size, void *dst, size_t *dst_size);
- void **dst, uint64_t *dst_alloc_size, uint64_t* dst_size, uint64_t dst_max);
+ void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max);
_cleanup_free_ char *text, *buf;
_cleanup_free_ void *buf2 = NULL;
_cleanup_free_ char *text, *buf;
_cleanup_free_ void *buf2 = NULL;
size_t skipped = 0, compressed = 0, total = 0;
text = make_buf(MAX_SIZE);
buf = calloc(MAX_SIZE + 1, 1);
size_t skipped = 0, compressed = 0, total = 0;
text = make_buf(MAX_SIZE);
buf = calloc(MAX_SIZE + 1, 1);
int r;
r = compress(text, i, buf, &j);
int r;
r = compress(text, i, buf, &j);
- /* assume compresion must be succesful except for small inputs */
- assert(r == 0 || (i < 2048 && r == -ENOBUFS));
+ /* assume compression must be successful except for small inputs */
+ assert_se(r == 0 || (i < 2048 && r == -ENOBUFS));
- log_error("%s \"compressed\" %zu -> " PRIu64, label, i, j);
+ log_error("%s \"compressed\" %zu -> %zu", label, i, j);
r = decompress(buf, j, &buf2, &buf2_allocated, &k, 0);
r = decompress(buf, j, &buf2, &buf2_allocated, &k, 0);