bzip2
Bindings to libbzip2 for bzip2 compression and decompression exposed as Reader/Writer streams.
0.6.1
153M downloads/mo
#605 most downloaded on crates.io
trifectatechfoundation/bzip2-rs
What this package is like to depend on
Last release 10 months ago
16 Oct 2025
Release timing varies
gaps range from 2 weeks to 2.2 years
Rarely documented
notes for 4 of 25 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
25 releases · first in 2014
1 release in the last 12 months
see the full history below
Release timeline
25 releases · Nov 2014 to Oct 2025Releases
latest 25-
0.6.116 Oct 2025Nothing published for this version
-
0.6.017 Jun 2025Release notes
Open source →Highlights
This release switches to libbz2-rs-sys as the default bzip2 backend. It is written in rust, making it much easier to cross-compile. The new implementation is also more performant.
The rust implementation does not export C symbols by default. An explicit dependency on
libbz2-rs-sysand setting theexport-symbolsfeature flag will fix that if needed.The
bzip2-sysfeature flag can be used to continue to use the C backend (either the system library of a C version built from source).This is a breaking release, given that we want this update to be opt-in. We've used the occasion to perform an MSRV bump to
1.82.0. Thelibbz2-rs-syscrate has thebzip2-1.0.6license. Arguably, that is the license thatbzip2-sysshould have had too, given that it is just a wrapper of the original bzip2 (andlibbz2-rs-sysis a derivative work). You may need to allow this license when usingcargo-deny.What's Changed
- Release 0.6.0 by @folkertdev in #141
Full Changelog: v0.5.2...v0.6.0
-
0.5.228 Feb 2025Release notes
Open source →Some minor fixes this time
- better wasm support (and we test wasm on CI)
- make
bz_internal_erroranextern fnby @folkertdev in #135 fixes a soundness issue. This is technically a semver-breaking change, but major versions for-syscrates create a lot of churn. We don't expect users to run into this
What's Changed
- fix: libc wasm types by @baszalmstra in #131
- update LICENSE-MIT by @rootdiae in #130
- run CI for
wasm32-wasip2by @folkertdev in #132 - remove libc dependency of
bzip2-sysby @folkertdev in #133 - make
bz_internal_erroranextern fnby @folkertdev in #135
New Contributors
- @baszalmstra made their first contribution in #131
- @rootdiae made their first contribution in #130
Full Changelog: v0.5.1...v0.5.2
-
0.5.111 Feb 2025Release notes
Open source →Highlights
Most changes relate to
libbz2-rs-sys: we no longer enable thestaticfeature, and now including different versions, that use either the C or the rust-syscrate, all work together in the same build.What's Changed
- write::BzDecoder: Fix infinite loop on drop when no data is read or written by @chenxiaolong in #118
- don't enable the
staticfeature when usinglibbz2-rs-sysby @folkertdev in #122 - update libbz2-rs-sys version that we use by @folkertdev in #123
- use
core::ffi::{c_int, c_uint}in favor oflibcby @folkertdev in #126 - Add finisher drop implementation to BzEncoder by @jonasbb in #121
- Update rand requirement from 0.8 to 0.9 by @dependabot in #127
- Disable bzip2-sys build script if rust backend is enabled by @NobodyXu in #125
- deprecate
Compression::newby @folkertdev in #124 - build the docs on CI by @folkertdev in #128
- bump version to 0.5.1 and 0.1.12 by @folkertdev in #129
New Contributors
- @chenxiaolong made their first contribution in #118
- @jonasbb made their first contribution in #121
- @dependabot made their first contribution in #127
- @NobodyXu made their first contribution in #125
Full Changelog: v0.5.0...v0.5.1
-
0.5.011 Dec 2024Release notes
Open source →The 0.5.0 release is the first release in ~2 years. It sets an msrv of 1.65.0 and pins the 2021 edition. If the msrv or edition are a problem for your project: just stick with the 0.4.4 release.
The repository has moved from @alexcrichton to @trifectatechfoundation, which takes on its maintainership from this point forward.
The main new feature of this release is the
libbz2-rs-sysfeature flag, which uses the pure rust https://github.com/trifectatechfoundation/libbzip2-rs implementation of bzip2. Being all rust, and using (by default) the rust allocator infrastructure, cross-compilation (e.g. to webassembly) should be much easier.Besides that, the documentation was modernized (we can cross-link now) and several bugs were fixed.
What's Changed
- update
partial_ioto version0.5.4by @folkertdev in #108 - Remove tokio support by @folkertdev in #109
- support
libbz2-rs-sysby @folkertdev in #110 - set msrv to 1.65.0 by @folkertdev in #111
- set the edition to 2021 by @folkertdev in #112
- fix clippy warnings by @folkertdev in #113
- update documentation by @folkertdev in #114
- Don't enable the stdio feature for the rust implementation of bzip2 by @bjorn3 in #117
- Fix infinite loop after invalid data by @jongiddy in #99
- prepare release 0.5.0 by @folkertdev in #115
New Contributors
- @folkertdev made their first contribution in #108
- @bjorn3 made their first contribution in #117
- @jongiddy made their first contribution in #99
Full Changelog: 0.4.4...v0.5.0
- update
-
0.4.405 Jan 2023Nothing published for this version
-
0.4.309 Jun 2021Nothing published for this version
-
0.4.219 Feb 2021Nothing published for this version
-
0.4.106 Jul 2020Nothing published for this version
-
0.3.303 May 2018Nothing published for this version
-
0.3.212 Apr 2017Nothing published for this version
-
0.3.120 Jan 2017Nothing published for this version
-
0.3.008 Feb 2016Nothing published for this version
-
0.2.401 Feb 2016Nothing published for this version
-
0.2.303 Apr 2015Nothing published for this version
-
0.2.202 Apr 2015Nothing published for this version
-
0.2.126 Mar 2015Nothing published for this version
-
0.2.024 Feb 2015Nothing published for this version
-
0.1.328 Jan 2015Nothing published for this version
-
0.1.223 Jan 2015Nothing published for this version
-
0.1.109 Jan 2015Nothing published for this version
-
0.1.005 Jan 2015Nothing published for this version
-
0.0.319 Nov 2014Nothing published for this version
-
0.0.219 Nov 2014Nothing published for this version
-
0.0.113 Nov 2014Nothing published for this version