diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-07-24 19:39:26 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-07-24 19:42:48 +0200 |
commit | 948a871c7348a4cfd9caa1e797d17e503c095a63 (patch) | |
tree | 4128f74f0664a4a05c677acd60e3bef7061e4284 /src/Common/libzip/zip_algorithm_deflate.c | |
parent | 5cf7d946d2e1d68065c772c9e76ba7dad52e96f9 (diff) | |
download | VeraCrypt-948a871c7348a4cfd9caa1e797d17e503c095a63.tar.gz VeraCrypt-948a871c7348a4cfd9caa1e797d17e503c095a63.zip |
Windows: update libzip to latest version 1.7.3 (close issue #656)
Diffstat (limited to 'src/Common/libzip/zip_algorithm_deflate.c')
-rw-r--r-- | src/Common/libzip/zip_algorithm_deflate.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Common/libzip/zip_algorithm_deflate.c b/src/Common/libzip/zip_algorithm_deflate.c index 30e072a5..d28a1ac5 100644 --- a/src/Common/libzip/zip_algorithm_deflate.c +++ b/src/Common/libzip/zip_algorithm_deflate.c @@ -91,8 +91,8 @@ deallocate(void *ud) { } -static int -compression_flags(void *ud) { +static zip_uint16_t +general_purpose_bit_flags(void *ud) { struct ctx *ctx = (struct ctx *)ud; if (!ctx->compress) { @@ -100,10 +100,10 @@ compression_flags(void *ud) { } if (ctx->compression_flags < 3) { - return 2; + return 2 << 1; } else if (ctx->compression_flags > 7) { - return 1; + return 1 << 1; } return 0; } @@ -220,12 +220,13 @@ process(void *ud, zip_uint8_t *data, zip_uint64_t *length) { } } -// clang-format off +/* clang-format off */ zip_compression_algorithm_t zip_algorithm_deflate_compress = { compress_allocate, deallocate, - compression_flags, + general_purpose_bit_flags, + 20, start, end, input, @@ -237,7 +238,8 @@ zip_compression_algorithm_t zip_algorithm_deflate_compress = { zip_compression_algorithm_t zip_algorithm_deflate_decompress = { decompress_allocate, deallocate, - compression_flags, + general_purpose_bit_flags, + 20, start, end, input, @@ -245,4 +247,4 @@ zip_compression_algorithm_t zip_algorithm_deflate_decompress = { process }; -// clang-format on +/* clang-format on */ |