VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/zlib/compress.c
diff options
context:
space:
mode:
authorDLL125 <134442578+DLL125@users.noreply.github.com>2023-08-20 09:21:54 +0200
committerGitHub <noreply@github.com>2023-08-20 09:21:54 +0200
commit4f92ba548445e84bab61e06f89ee1e341a92f716 (patch)
treec4409ca025048e7b6f99555b22b026ec5898e06e /src/Common/zlib/compress.c
parent89d340271c4d584b649eb9974f15a1ee557c91a1 (diff)
downloadVeraCrypt-4f92ba548445e84bab61e06f89ee1e341a92f716.tar.gz
VeraCrypt-4f92ba548445e84bab61e06f89ee1e341a92f716.zip
Update zlib to latest (#1181)
* Update zlib to latest * Update copyright Updated copyright of zlib.
Diffstat (limited to 'src/Common/zlib/compress.c')
-rw-r--r--src/Common/zlib/compress.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/Common/zlib/compress.c b/src/Common/zlib/compress.c
index 2ad5326c..f43bacf7 100644
--- a/src/Common/zlib/compress.c
+++ b/src/Common/zlib/compress.c
@@ -19,13 +19,8 @@
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
Z_STREAM_ERROR if the level parameter is invalid.
*/
-int ZEXPORT compress2(dest, destLen, source, sourceLen, level)
- Bytef *dest;
- uLongf *destLen;
- const Bytef *source;
- uLong sourceLen;
- int level;
-{
+int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source,
+ uLong sourceLen, int level) {
z_stream stream;
int err;
const uInt max = (uInt)-1;
@@ -65,12 +60,8 @@ int ZEXPORT compress2(dest, destLen, source, sourceLen, level)
/* ===========================================================================
*/
-int ZEXPORT compress(dest, destLen, source, sourceLen)
- Bytef *dest;
- uLongf *destLen;
- const Bytef *source;
- uLong sourceLen;
-{
+int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source,
+ uLong sourceLen) {
return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
}
@@ -78,9 +69,7 @@ int ZEXPORT compress(dest, destLen, source, sourceLen)
If the default memLevel or windowBits for deflateInit() is changed, then
this function needs to be updated.
*/
-uLong ZEXPORT compressBound(sourceLen)
- uLong sourceLen;
-{
+uLong ZEXPORT compressBound(uLong sourceLen) {
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
(sourceLen >> 25) + 13;
}