diff options
author | Hans Kristian Rosbach <hk-git@circlestorm.org> | 2021-12-13 22:30:58 +0100 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2021-12-24 12:52:14 +0100 |
commit | 8a378ba9b85e23a6e2e67b01a1b3d738e86faefe (patch) | |
tree | e9e0dc35c97219e5b7276f5c026f28ab6e9f02dd /test | |
parent | 2faaf5bbc993c09f7344353b824e1c1ad585627f (diff) |
Fix deflateBound and compressBound returning very small size estimates.
Remove workaround in switchlevels.c, so we do actual testing of this.
Use named defines instead of magic numbers where we can.
Diffstat (limited to 'test')
-rw-r--r-- | test/switchlevels.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/switchlevels.c b/test/switchlevels.c index a4ec4b7..1e1fb00 100644 --- a/test/switchlevels.c +++ b/test/switchlevels.c @@ -68,7 +68,7 @@ static int compress_chunk(PREFIX3(stream) *strm, int level, int size, int last) goto done; } - compsize = 100 + 2 * PREFIX(deflateBound)(strm, size); + compsize = PREFIX(deflateBound)(strm, size); buf = malloc(size + compsize); if (buf == NULL) { fprintf(stderr, "Out of memory\n"); |