Releases: trifectatechfoundation/zlib-rs
v0.5.2
What's Changed
- add a fuzzer that compresses the gzip header by @folkertdev in #384
- distribute
zlib.handzconf.hby @folkertdev in #385 - fix valgrind issue in test by @folkertdev in #387
- Export crc32_combine64 and adler32_combine64 for 32bit architectures by @jakos-sec in #386
- Correct naming of zlib-sys to libz-sys by @erikjee in #390
- expose the 64-bit versions of some gz functions by @folkertdev in #388
- extract
SymBufby @folkertdev in #391 - libz-rs-sys-cdylib: include LICENSE by @j-vanderstoep in #394
- clippy fixes for 1.88.0 by @folkertdev in #395
- fix valgrind install command by @folkertdev in #398
- Strengthen the lint directives related to unsafe code by @brian-pane in #396
- Export crc32_z and adler32_z by @jakos-sec in #399
- Declare BitReader::refill unsafe and document safety prerequisites by @brian-pane in #397
- expose the allocators as statics by @folkertdev in #402
- clippy by @folkertdev in #405
- Ci cleanup by @folkertdev in #406
- work around avx512vl miscompilation by @folkertdev in #408
- export
get_crc_tableby @folkertdev in #409
New Contributors
- @jakos-sec made their first contribution in #386
Full Changelog: v0.5.1...v0.5.2
v0.5.1
Highlights
- we now have experimental support for the
gz*functions when building a C dynamic library. See the README oflibz-rs-sys-cdylib. (most of the work here was done by @brianpane - fixed a bug where uninitialized memory was read (but not used) during decompression, see #346
- fixed some logic bugs in the construction of the gzip header (unlikely to come up in practice)
- performance improvements for compression and decompression
- we support
inflateCodesUsed,inflateGetDictionaryanddeflateGetDictionary
What's Changed
- remove CI usage of
ubuntu-20.04, just useubuntu-latestby @folkertdev in #330 - Partial implementation of gzopen and gzclose by @brian-pane in #326
- Add Linux-specific gzopen options and more tests by @brian-pane in #332
- Add some comments to gzopen_help and reduce the amount of unsafe code by @brian-pane in #333
- Fix unsafe_op_in_unsafe_fn warning in AArch64 CRC32 implementation by @brian-pane in #334
- bump codecov action version by @folkertdev in #336
- Finish implementing gz_open and add gzdopen and gzerror by @brian-pane in #335
- Add gzclearerr and gzeof functions by @brian-pane in #339
- Micro-optimization for decompression by @mat-1 in #320
- use
cargo nextestwithcargo llvm-covto gather the test coverage by @folkertdev in #338 - ignore coverage of test files by @folkertdev in #342
- run the uncompress fuzzer with a custom corpus and gather fuzzer codecov by @folkertdev in #337
- stop using custom wasm simd for
slide_hashby @folkertdev in #343 - Implement gzdirect by @brian-pane in #341
- Copy chunks as
MaybeUninit<u8>by @folkertdev in #346 - Implement gzread and gzbuffer by @brian-pane in #345
- Implement gzwrite and gzflush by @brian-pane in #347
- Fuzz coverage error paths by @folkertdev in #344
- Make gzclose_r and gzclose_w part of the public API by @brian-pane in #348
- Implement gzoffset and gztell by @brian-pane in #349
- Implement gzputc and gzputs by @brian-pane in #351
- Implement gzgetc and gzgets by @brian-pane in #352
- Implement gzfread by @brian-pane in #353
- Implement gzfwrite and add null buffer check to gzfread by @brian-pane in #354
- Implement gzungetc by @brian-pane in #355
- Implement gzsetparams by @brian-pane in #356
- Implement gzseek for reads, as well as gzrewind by @brian-pane in #358
- Implement gzseek for writes by @brian-pane in #359
- check for and enable the
bmi1andbmi2target feature by @folkertdev in #362 - Additional gz test coverage by @brian-pane in #363
- use more idiomatic way to create an integer out of a repeating byte by @folkertdev in #364
- use an autovectorized
slide_hash_chainon neon by @folkertdev in #366 - add
inflateCodesUsedby @folkertdev in #350 - Hard-code the hash function for the quick deflate algorithm by @brian-pane in #369
- faster
compare256aarch64 neon implementation by @Dr-Emann in #371 - Move gz API to libz-rs-sys-cdylib by @brian-pane in #365
- Cache locality improvement for deflate State.lookahead by @brian-pane in #372
- Hard-code the hash selection for the fast and medium deflate algorithms by @brian-pane in #373
- Optimize out some read operations from the quick deflate algorithm by @brian-pane in #374
- Optimize out some read operations from the fast deflate algorithm by @brian-pane in #375
- Reserve half of the GzState input buffer space for gzprintf. by @brian-pane in #378
- run the zlib C tests on our cdylib by @folkertdev in #377
- Fix import resolution in crc32 for the Android build by @j-vanderstoep in #379
- add
gzprintfby @folkertdev in #376 - add
inflateGetDictionaryanddeflateGetDictionaryby @folkertdev in #380 - Use core::mem::transmute instead of std in wasm adler32 by @storo-dfend in #382
cdylib: usecoreinstead ofstdby @folkertdev in #383- fix a bug in the value of the FTEXT field of the gz header by @folkertdev in #381
New Contributors
- @mat-1 made their first contribution in #320
- @Dr-Emann made their first contribution in #371
- @j-vanderstoep made their first contribution in #379
- @storo-dfend made their first contribution in #382
Full Changelog: v0.5.0...v0.5.1
v0.5.0
This is technically a breaking change, but unless you rely on rust exporting C symbols, you should not run into any issues when upgrading.
highlights
- the
export-symbolsfeature now controls whether C symbols are exported. This feature is off by default (that is why this is a breaking change; the behavior of earlier versions was to export those symbols). For rust users that is almost certainly the correct default, because it means zlib-rs can be used together with stock zlib or zlib-ng in the same project. This should fix some issues with symbol clashes betweenlibz-sys(used e.g. by openssl) andzlib-rs. - the
cdylibcrate now usespanic=abort. For C users, that is the only safe way to panic, because unwinding to C is unsound. - Some simplifications to simd code: in a number of cases, LLVM optimizes safe rust code to the equivalent assembly that we achieved with explicit simd before.
What's Changed
- make the fallback implementation of slidehash vectorize better by @folkertdev in #296
- Clippy 1.85.0 fixes by @folkertdev in #299
- the standard
slide_hashimplementation vectorizes well on avx2 by @folkertdev in #298 - remove explicit SIMD reads and writes by @folkertdev in #303
- Store mode on the stack in dispatch by @bjorn3 in #304
- add
Cargo.lockby @folkertdev in #308 zlig-ng->zlib-ngby @folkertdev in #310- use a more straightforward bit counting operaration by @folkertdev in #311
- use safe chunking in wasm32/aarch64 compare256 by @folkertdev in #312
- Inflate cleanups by @folkertdev in #313
- Show sponsor button by @erikjee in #316
- add
semver-prefixfeature (like we have for libbz2-rs-sys) by @folkertdev in #318 - explicitly document memory management by @folkertdev in #317
- Loop match preparations by @folkertdev in #319
- add
export-symbolsfeature flag by @folkertdev in #322 - add
panic=abortto the cdylib by @folkertdev in #323 - run clippy for more scenarios by @folkertdev in #325
- add
zlibCompileFlagsby @folkertdev in #324 - refactor zeroed allocation api by @folkertdev in #327
- fix alignment in zeroed allocations by @folkertdev in #328
- investigate CI failure by @folkertdev in #329
Full Changelog: v0.4.2...v0.5.0
v0.4.2
Lots of performance improvements. We're now substantially faster than other implementations for inflate (decompression), and faster in the most important cases for compression.
What's Changed
- Speed up emit_dist with precomputed length codings for static trees by @brian-pane in #264
- Add a comment to explain how Crc32HashCalc is sometimes Crc32C by @brian-pane in #266
- Fix the usage message for crc32_bench by @brian-pane in #267
- Add some comments explaining the chained hash data structure. by @brian-pane in #269
- Cleanups for struct State by @brian-pane in #274
- Begin converting match offsets in struct State to u16 by @brian-pane in #275
- Remove the cloning of scan_start & scan_end in longest_match_help by @brian-pane in #268
- Simplify deflate window by @folkertdev in #272
- cleanup of
fill_windowby @folkertdev in #271 - Add checks for State memory layout by @brian-pane in #278
- Update zlib-ng version 2.2.3 by @folkertdev in #282
- Move the TreeDesc fields and finish adding cache line markers to State by @brian-pane in #279
- Make various fields in the State structure smaller by @brian-pane in #281
- Hint to the compiler to inline the fill_window function by @brian-pane in #270
- Remove the padding from the State structure by @brian-pane in #283
- Optimize away compare256 for short matches by @brian-pane in #284
- Faster comparisons for priority queue by @brian-pane in #285
- Fix CI by @bjorn3 in #288
- Add CI benchmarking by @bjorn3 in #287
- fuzzer: make sure the buffer is large enough to store the input by @folkertdev in #286
- compare our and stock zlib compression levels in README by @folkertdev in #291
- specialize
inflate_fast_helpforavx2by @folkertdev in #289 - gather benchmark data for chromium (only inflate is relevant) by @folkertdev in #290
- manual struct target feature by @folkertdev in #292
- Make the matches field smaller to improve cache locality by @brian-pane in #293
- apply the
crctarget feature to the acle crc32 implementation by @folkertdev in #294
Full Changelog: v0.4.1...v0.4.2
Version 0.4.1
A minor release, but with some nice goodies.
We now support building C-compatible dynamic libraries with cargo c. The readme of the libz-rs-sys-cdylib crate has all the details.
Additionally, performance has improved drastically. We fixed an incorrect loop bound and started using the enable-dfa-jump-thread llvm flag in our benchmarks, which give inflate performance that is consistently better than zlib-ng. Meanwhile @brian-pane has been making some smaller improvements to deflate performance, where we already beat zlib-ng in some, but not yet in all cases.
What's Changed
- run the flate2 test suite on CI by @folkertdev in #250
- Add a release checklist by @rnijveld in #251
- Revert "load the inflate reader and writer to the stack" by @folkertdev in #252
- Add the metadata needed by cargo-c by @lu-zero in #176
- rust 1.83.0 clippy fixes by @folkertdev in #254
- Avoid an out-of-bounds panic in deflate_stored by @bjorn3 in #255
- cdylib cleanup by @folkertdev in #256
- inflate: make use of
enable-dfa-jump-threadby @folkertdev in #257 - Parallelize the checking of the first two bytes of a potential match. by @brian-pane in #259
- Fix
inflate_fast_helploop bound by @folkertdev in #260 - Small additional speedup for deflate_quick by @brian-pane in #262
- Inline the fast path of BitWriter::send_bits by @brian-pane in #258
- release version 0.4.1 by @folkertdev in #265
New Contributors
- @lu-zero made their first contribution in #176
- @brian-pane made their first contribution in #259
Full Changelog: v0.4.0...v0.4.1
v0.4.0
What's Changed
- Clippy update by @squell in #178
- It is time to have a security policy by @squell in #177
- wasm: add a
compare256wasm simd implementation by @folkertdev in #179 - inline
copy_match_helpby @folkertdev in #180 - inflate: use custom
Writerby @folkertdev in #181 - simplify
struct Tableby @folkertdev in #182 - Inflate cache opts by @folkertdev in #183
- add chunked and adler32 measurements by @folkertdev in #184
- unroll
copy_chunk_uncheckedby @folkertdev in #185 - cleanup
Writerapi usage by @folkertdev in #186 - Extend from window by @folkertdev in #187
- add specific tests for
copy_matchby @folkertdev in #188 - remove adler32 COPY variant (memcpy is faster) by @folkertdev in #189
- remove casting noise around
drop_bitsby @folkertdev in #191 - Writer tuning by @folkertdev in #192
- remove
libz-sysdependency fromzlib-rscrate by @folkertdev in #194 - use wider loads/stores in
Writeron aarch64 by @folkertdev in #196 - wasm: use wider loads/stores in
copy_matchby @folkertdev in #197 - wasm: SIMD adler32 by @folkertdev in #198
- wasm: SIMD
slide_hashby @folkertdev in #199 - wasm: allow unaligned reads in
longest_matchby @folkertdev in #202 - fix UB in
inflate::State::extraby @folkertdev in #203 - Reenable deflate::test::insufficient_compress_space under Miri by @inahga in #204
- move the repository (and fix links) by @folkertdev in #208
- Add Prossimo as initiator by @erikjee in #209
- fix for reading/writing uninitialized memory by @folkertdev in #211
- try this codecov thing by @folkertdev in #215
- fix bug in inflate_fast when refilling by @folkertdev in #216
- run more
deflate::tests under miri by @folkertdev in #214 - set
head.done = -1if a gzip header was configured but the input is not gzip data by @folkertdev in #217 - Run test-libz-rs-sys tests on wasm in CI by @bjorn3 in #220
- fix panic in the stored algorithm by @folkertdev in #221
- fix panic in crc32 hash calc by @folkertdev in #222
- optimize the
mediumalgorithm by @folkertdev in #223 - Replace usage of LD_PRELOAD with LD_LIBRARY_PATH by @bjorn3 in #227
- Fix a couple of warnings when building for wasm by @bjorn3 in #226
- Stop passing -fno-pic when building for wasm by @bjorn3 in #225
- fix 2 memory leaks in deflate tests by @folkertdev in #228
- gzip: make header functions unsafe and document preconditions by @inahga in #235
- just always initialize the window buffer with zeros by @folkertdev in #234
- crc32: mark some unsafe functions properly, add some safety documentation by @inahga in #236
- Miri stacked borrows improvements for inflate by @folkertdev in #237
- longest_match: handle underflow in assertion by @inahga in #240
- run deflate tests under stacked borrows by @folkertdev in #239
- adler32: document some unsafe blocks by @inahga in #238
- fuzzing: inflate fuzz suite for catching UB by @inahga in #231
- inflate/bitreader: fix unsoundness in advance() by @inahga in #242
- deflate: safety documentation, relax safety requirements of wasm intrinsics by @inahga in #241
- follow
MaybeUninit::slice_assume_init_refimplementation by @folkertdev in #243 - inflate: some safety documentation by @inahga in #244
- libz-rs-sys: more safety requirements on inflate() and deflate() by @inahga in #245
- add section on using; change spelling to US by @squell in #247
- Loop plus match by @folkertdev in #248
New Contributors
- @squell made their first contribution in #178
- @inahga made their first contribution in #204
- @erikjee made their first contribution in #209
Full Changelog: v0.3.0...v0.4.0
v0.3.1
What's changed
- fix out-of-bounds write in Pending by @folkertdev
- fix UB in inflate::State::extra by @folkertdev
- backport ptr aliasing bugfix by @folkertdev
Full Changelog: v0.3.0...v0.3.1
Version 0.3.0
What's Changed
- add
custom-prefixfeature flag by @folkertdev in #125 - silence some warnings in dynamic-libz-sys by @folkertdev in #128
- use zlib-rs as a dynamic c library by @folkertdev in #127
- Update README.md by @rnijveld in #129
- Symbol visibility fixes by @folkertdev in #130
- add
ROADMAP.mdby @folkertdev in #131 - Simplify test suite 1 by @folkertdev in #132
- move libz-rs-sys tests into its own crate by @folkertdev in #133
- gate the
crc32_hash_calctest on x86, x86_64 and aarch64 by @folkertdev in #137 - fix test suite on
s390x-unknown-linux-gnuby @folkertdev in #138 - test
i686ands390xon CI by @folkertdev in #139 - clean up
hash_calcselection logic by @folkertdev in #140 - Ci cross compile by @folkertdev in #141
- centralize fuzzing helpers by @folkertdev in #142
- guarantee that the alloc/free function pointer always point to the same thing by @folkertdev in #144
- handle
NULLin adler32 and crc32 functions by @folkertdev in #145 - add safety comments & tests to (un)compress by @folkertdev in #146
- tests/comments for foundational inflate functions by @folkertdev in #147
- document the rest of the inflate functions by @folkertdev in #148
- Deflate docs by @folkertdev in #149
- test edge cases in the public C api by @folkertdev in #150
- handle partially uninitialized streams properly by @folkertdev in #151
- cover some uncovered paths by @folkertdev in #152
- switch the instruction used for acle crc32 calculation by @folkertdev in #154
- add more tests for
inflateGetHeaderby @folkertdev in #153 - mirror zlib-ng behavior for i686 by @folkertdev in #155
mod read_buf: remove unused methods by @folkertdev in #158- refinements to unsafe code by @folkertdev in #157
- correct target features (based on miri) by @folkertdev in #159
- add target features for the SIMD compare256 operations by @folkertdev in #160
- correct target features in
hash_calcby @folkertdev in #161 - quick algorithm quick cleanup by @folkertdev in #162
- fix bug in the quick algorithm (Z_BEST_SPEED) by @folkertdev in #165
- centralize cpu feature detection by @folkertdev in #167
- fix oversight in one of the quick deflate macros by @folkertdev in #170
- add a separate cdylib crate by @folkertdev in #168
- Use the "C-unwind" abi for functions we cannot guarantee won't panic by @folkertdev in #171
- fix issue 172 by @folkertdev in #173
- remove unneeded slice operation by @folkertdev in #175
Full Changelog: v0.2.1...v0.3.0
Version 0.2.1
What's Changed
- Fix inflate() flush modes and implement state.data_type by @cjgriscom in #113
- stop using crc32 hash on aarch64 by @folkertdev in #112
- fix
inflate::uncompressbug by @folkertdev in #116 - include LICENSE file in published crates by @decathorpe in #118
inflate::reset_keep: clear more fields by @folkertdev in #121- Refactor dynamic loading by @folkertdev in #122
- make
libz-rs-sysandzlib-rsuse their local README.md for crates.io by @folkertdev in #120
New Contributors
- @cjgriscom made their first contribution in #113
- @decathorpe made their first contribution in #118
Full Changelog: v0.2.0...v0.2.1
Version 0.2.0
- Fix bug with window padding
- Add no_std support