Skip to content

Commit

Permalink
missing zlib 1.3 file update
Browse files Browse the repository at this point in the history
  • Loading branch information
obiltschnig committed Oct 3, 2023
1 parent a9e36e0 commit b4fd3be
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions Foundation/src/compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -65,22 +60,16 @@ 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);
}

/* ===========================================================================
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;
}

0 comments on commit b4fd3be

Please sign in to comment.