summaryrefslogtreecommitdiff
path: root/deflate.c
AgeCommit message (Collapse)Author
2021-12-24Fix deflateBound and compressBound returning very small size estimates.Hans Kristian Rosbach
Remove workaround in switchlevels.c, so we do actual testing of this. Use named defines instead of magic numbers where we can.
2021-05-16Spelling fixesGreg Sjaardema
2021-05-08upgrade links to HTTPSViktor Szakats
http://infozip.sourceforge.net/ is sadly not having HTTPS access enabled. Shoutout to somebody with admin access for this project: It would be nice to enable it and thus allowing secure access to these pages via https://infozip.sourceforge.io/ . The option has been there for a while now: https://sourceforge.net/blog/introducing-https-for-project-websites/ also: - follow permanent redirects - add ending slashes
2021-01-28Remove debug check for match beginning at start of window.Nathan Moinvaziri
2021-01-05Fixed previous match length not reset when match start reset.Nathan Moinvaziri
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24294
2021-01-05Add check in check_match for invalid match position.Nathan Moinvaziri
2021-01-05Improve check_match output to print hex values of mismatch characters and ↵Nathan Moinvaziri
character index.
2020-11-02Fixed conversion warning when assigning wsize to Pos variable.Nathan Moinvaziri
deflate.c(218,1): warning C4244: 'initializing': conversion from 'unsigned int' to 'Pos', possible loss of data deflate.c(241,1): warning C4244: 'initializing': conversion from 'unsigned int' to 'Pos', possible loss of data
2020-09-23Remove NIL preprocessor macro which isn't consistently enforced.Nathan Moinvaziri
2020-09-13Remove some of the references to the unreleased zlib 1.2.12Hans Kristian Rosbach
2020-08-31Clean up if blocks in deflate.cHans Kristian Rosbach
2020-08-31Remove s->method since it is always set to the same value and never read.Hans Kristian Rosbach
2020-08-31Move and reduce size of s->pending_buf_sizeHans Kristian Rosbach
2020-08-31Rename ZEXPORT and ZEXTERN for consistency.Nathan Moinvaziri
2020-08-31Rename ZLIB_INTERNAL to Z_INTERNAL for consistency.Nathan Moinvaziri
2020-08-27Fix some of the old and new conversion warnings in deflate*Hans Kristian Rosbach
2020-08-23Reintroduce support for ZLIB_CONST in compat mode. (#704)Mika Lindqvist
* Reintroduce support for ZLIB_CONST in compat mode.
2020-08-23Replace hash_bits, hash_size and hash_mask with defines.Hans Kristian Rosbach
2020-08-21Fix DFLTCC not flushing EOBS when creating raw streamsIlya Leoshkevich
2020-08-21Implement switching between DFLTCC and softwareIlya Leoshkevich
2020-08-21Use 15-bit window for quick strategy when compiling with DFLTCCIlya Leoshkevich
Hardware accelerator does not support 13-bit window.
2020-08-20Move zero check for insert_string count to fill_window since it is the only ↵Nathan Moinvaziri
place where count is ever passed as zero.
2020-08-20Harmonize the CPU architecture preprocessor definitions.Nathan Moinvaziri
2020-08-02Fixed extra symbols added to ABI when zlib-compat specified.Nathan Moinvaziri
2020-07-10Fixed signed integer comparison warning in deflatePrime bits check.Nathan Moinvaziri
deflate.c:589:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2020-07-10Fixed ubsan error in deflatePrime when bits is 32.Nathan Moinvaziri
deflate.c:602:15: runtime error: shift exponent 32 is too large for 32-bit type 'int32_t' (aka 'int') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /src/zlib-ng/deflate.c:602:15
2020-07-01Fixed bad shift operation warning in deflatePrime.Nathan Moinvaziri
Check that bits value is not greater than bits allowed by value type. CID 293475 (#2-4 of 4): Bad bit shift operation (BAD_SHIFT) In expression 1UL << put, left shifting by more than 63 bits has undefined behavior.
2020-06-30Use local match_len variable in deflate_slow.Nathan Moinvaziri
Remove match_len from deflate internal_state.
2020-06-27Don't need to set s->match_length to zero in deflate_huff.Nathan Moinvaziri
2020-06-27Use local variable to store match_len in deflate_rle.Nathan Moinvaziri
2020-06-20Fixed casting warningsPavel P
2020-06-09Use standard int types in zlib-ng api.Nathan Moinvaziri
2020-06-09Fixed deflate_quick algorithm not being used due to old check.Nathan Moinvaziri
2020-06-08Move Tracev flush statement into flush_pending.Nathan Moinvaziri
2020-06-08Move Tracevv statements when emitting literal to zng_tr_tally_lit.Nathan Moinvaziri
2020-06-08Move check for match length in deflate_quick to check_match.Nathan Moinvaziri
2020-06-08Fixed wrong 64-bit casting in deflatePrime potentially causing bits to be lost.Nathan Moinvaziri
Arithmetic overflow: Using operator '<<' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '<<' to avoid overflow (io.2). Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value. Results might not be an expected value.
2020-06-08Make deflate_quick algorithm available to all architectures. #205Nathan Moinvaziri
2020-05-30Remove IPos typedef which also helps to reduce casting warnings.Nathan Moinvaziri
2020-05-30Fixed casting warnings in calls to put_short and put_short_msb.Nathan Moinvaziri
deflate.c(845,32): warning C4244: 'function': conversion from 'unsigned int' to 'uint16_t', possible loss of data deflate.c(894,50): warning C4244: 'function': conversion from 'unsigned int' to 'uint16_t', possible loss of data
2020-05-30Fixed casting warnings about copying len into pending buf, replaced with ↵Nathan Moinvaziri
calls to put_short. deflate.c(1413,45): warning C4244: '=': conversion from 'unsigned int' to 'unsigned char', possible loss of data deflate.c(1414,50): warning C4244: '=': conversion from 'unsigned int' to 'unsigned char', possible loss of data deflate.c(1415,46): warning C4244: '=': conversion from 'unsigned int' to 'unsigned char', possible loss of data deflate.c(1416,51): warning C4244: '=': conversion from 'unsigned int' to 'unsigned char', possible loss of data
2020-05-30Use a constant to load adler-32 initial hash value.Nathan Moinvaziri
2020-05-27Fixed missing window_padding added to window alloc size in deflateCopy.Nathan Moinvaziri
2020-05-24Simplify generic hash function using knuth's multiplicative hash.Nathan Moinvaziri
2020-05-24Use 64-bit bit buffer when emitting codes.Nathan Moinvaziri
2020-05-24Combine longest_match implementations and use compare258 functable stub.Nathan Moinvaziri
2020-05-06Remove several NOT_TWEAK_COMPILER checks and their legacy code.Hans Kristian Rosbach
2020-05-06Unify emitting of literals and match dist/lengths. Removed deflate quick ↵Nathan Moinvaziri
static tables, allowing for 32k window.
2020-05-01Standardize fill_window implementations and abstract out slide_hash_neon for ↵Nathan Moinvaziri
ARM.
2020-04-30Replaced insert_string with quick_insert_string if length is 1.Nathan Moinvaziri