It incorrectly doubles the size on each iteration.
Fixes: 85a9b1b5 "util/disk_cache: compress individual cache entries"
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
assert(ret != Z_STREAM_ERROR); /* state not clobbered */
size_t have = BUFSIZE - strm.avail_out;
- compressed_size += compressed_size + have;
+ compressed_size += have;
size_t written = 0;
for (size_t len = 0; len < have; len += written) {