Releases: wcampbell0x2a/backhand
Releases · wcampbell0x2a/backhand
Release list
v0.25.1
backhand
- v3: Add kinds:
BE_V3_1_LZMA_SWAPandLE_V3_1_LZMA_SWAP- Big and little endian, with special magic.
- General support for v3.1, no on-disk changes.
- v3: Fall back to standard LZMA even if adaptive is picked. Thanks vendors!
backhand-cli
- Add --kinds:
le_v3_1_lzma_swapandbe_v3_1_lzma_swap
v0.25.0
[v0.25.0] - 2025-02-14
backhand
- Update depends
- Update
lzma-rust2tov0.16.0 - Fix handling of adding files larger than 4 GiB, thanks @nickguletskii.
- Add window size impl for gzip, thanks @h4dynn.
backhand-cli
- Update depends
- Remove libc depend
fuzz
- Update depends
v0.24.1
backhand
- Add a method to create an XzFilter, thanks @h4dynn.
- impl Seek for SquashfsReadFile, thanks @AMZN-hgoffin.
- Update dependencies
backhand-cli
- Update dependencies
v0.24.0
[v0.24.0] - 2025-12-06
backhand
- Add Normal and Vendor SquashFS 3.0 Read support. This has been a long time coming, and required many under-the-hood changes.
Just as before, these are all featured in the kind module. When lzma settings cannot be determined from the file,
backhand falls back to the https://github.com/wcampbell0x2a/lzma-adaptive-sys bindings (based on sasquatch's LZMA adaptive library).
Kinds:
be_v3_0le_v3_0be_v3_0_lzmale_v3_0_lzmanetgear_be_v3_0_lzmanetgear_le_v3_0_lzma
Features:
v3v3_lzma
As always, if you find a SquashFS v3.0 that our tools can't use, let me know!
- Update to 2024 edition
- Bump MSRV to 1.86
- Change
FilesystemReader::files()to return an iterator instead ofVec
backhand-cli
- unsquashfs: Try all kinds by default when
--kindisn't specified - unsquashfs: Improve error output
- Update to 2024 edition
- Bump MSRV to 1.86
v0.23.0
backhand
- Add feature
parallel, which enables internal parallelization when de-compressing data. Whenparallelis not used, the old behavior of reading without parallelization is used. (#716)- This substantially increases the speed of backhand-unsquashfs, removing about half of the wall time! See the new benchmarks for details.
- Fix misaligned pointer loads when using Deku. thanks @bdash! (#713)
- Fix incorrect assertion about file size (#730)
- Use rust library
liblzmainstead ofxz2. This bumps the version of XZ used to 5.8.1. (#712)- This also removes the need for
HAVE_DECODERdefines/CFLAGS when building xz, asliblzmaenables them when building by default.
- This also removes the need for
backhand-cli
- unsquashfs: Properly flush the file writer
backhand-cli
- Use
backhandfeaturesparallelby default (and in release builds). Exposed by usingbackhand-parallel.
v0.22.0
v0.21.0
v0.20.0
v0.19.0
backhand
- Use feature
zlib-ngforflate2, which is enabled when compression optionGzipis used. This enables the backend to use zlib-ng, which is faster by default! (#562) - Remove duplicated data when addding new files to a
FilesystemWriter. This also applies this behavior to theaddandreplacebinaries. This is controllable withFilesystemWriter::set_no_duplicate_files. (#603), (#594) - Increase speed of internal
HashMaps, by switching toxxhashand just using theinodeas the key in other places. - Changed
SuperBlock::Flagsto be public. - Add non-standard CompressionOptions support (#584)
- Add
CompressionAction::compression_optionsto override the default compression options emitted during writing. - Add
FilesystemWriter::set_emit_compression_options
- Add
- Support sparse file extraction (#624)
- Add
x86_64-pc-windows-gnusupport (@Wolfyxon) (#634) - Add zlib-rs support through
--feature gzip-zlib-rs.
Security
- Prevent self referential dirs, which could cause a stack overflow (#624)
- Avoid high allocations for high inode count (#624)
backhand-cli
- Add
--no-compression-optionstoaddandreplaceto remove compression options from image after modification. - Add
--pad-lentoreplaceandaddto control the length of end-of-image padding (#604) - Bump MSRV to
1.77
Dependencies
- Bump
thiserrorfrom 1.0.59 to 2.0.1 (#564, #578, #615, #633) - Bump
libcfrom 0.2.154 to 0.2.162 (#557, #592, #616, #630) - Bump
clapfrom 4.5.4 to 4.5.13 (#569, #574, #582) - Bump
rustc-hashfrom 1.1.0 to 2.0.0 (#570) - Bump
clap_completefrom 4.5.2 to 4.5.13 (#575, #595) - Bump
document-featuresfrom 0.2.8 to 0.2.10 (#576) - Bump
zstd-safefrom 7.1.0 to 7.2.1 (#585) - Bump
flate2from 1.0.30 to 1.0.35 (#593, #596, #617, #641) - Bump
zstdfrom 0.13.1 to 0.13.2 (#601) - Bump
env_loggerfrom 0.11.3 to 0.11.5 (#602) - Bump
libdeflaterfrom 1.21.0 to 1.22.0 (#619) - Bump
tempfilefrom 3.12.0 to 3.13.0 (#618) - Bump
nixfrom 0.28.0 to 0.29.0 (#566)
Complete API Updates
Click to expand
Removed items from the public API
=================================
-pub fn backhand::SuperBlock::data_has_been_duplicated(&self) -> bool
Changed items in the public API
===============================
-pub fn backhand::compression::CompressionOptions::from_reader_with_ctx<R: std::io::Read>(__deku_reader: &mut deku::reader::Reader<'_, R>, (endian, compressor): (deku::ctx::Endian, backhand::compression::Compressor)) -> core::result::Result<Self, deku::error::DekuError>
+pub fn backhand::compression::CompressionOptions::from_reader_with_ctx<R: std::io::Read + std::io::Seek>(__deku_reader: &mut deku::reader::Reader<'_, R>, (endian, compressor): (deku::ctx::Endian, backhand::compression::Compressor)) -> core::result::Result<Self, deku::error::DekuError>
-pub fn backhand::compression::CompressionOptions::to_writer<W: std::io::Write>(&self, __deku_writer: &mut deku::writer::Writer<W>, (endian, compressor): (deku::ctx::Endian, backhand::compression::Compressor)) -> core::result::Result<(), deku::error::DekuError>
+pub fn backhand::compression::CompressionOptions::to_writer<W: std::io::Write + std::io::Seek>(&self, __deku_writer: &mut deku::writer::Writer<W>, (endian, compressor): (deku::ctx::Endian, backhand::compression::Compressor)) -> core::result::Result<(), deku::error::DekuError>
-pub fn backhand::compression::Compressor::from_reader_with_ctx<R: std::io::Read>(__deku_reader: &mut deku::reader::Reader<'_, R>, endian: deku::ctx::Endian) -> core::result::Result<Self, deku::error::DekuError>
+pub fn backhand::compression::Compressor::from_reader_with_ctx<R: std::io::Read + std::io::Seek>(__deku_reader: &mut deku::reader::Reader<'_, R>, endian: deku::ctx::Endian) -> core::result::Result<Self, deku::error::DekuError>
-pub fn backhand::compression::Compressor::to_writer<W: std::io::Write>(&self, __deku_writer: &mut deku::writer::Writer<W>, endian: deku::ctx::Endian) -> core::result::Result<(), deku::error::DekuError>
+pub fn backhand::compression::Compressor::to_writer<W: std::io::Write + std::io::Seek>(&self, __deku_writer: &mut deku::writer::Writer<W>, endian: deku::ctx::Endian) -> core::result::Result<(), deku::error::DekuError>
-pub fn backhand::compression::Gzip::from_reader_with_ctx<R: std::io::Read>(__deku_reader: &mut deku::reader::Reader<'_, R>, endian: deku::ctx::Endian) -> core::result::Result<Self, deku::error::DekuError>
+pub fn backhand::compression::Gzip::from_reader_with_ctx<R: std::io::Read + std::io::Seek>(__deku_reader: &mut deku::reader::Reader<'_, R>, endian: deku::ctx::Endian) -> core::result::Result<Self, deku::error::DekuError>
-pub fn backhand::compression::Gzip::to_writer<W: std::io::Write>(&self, __deku_writer: &mut deku::writer::Writer<W>, endian: deku::ctx::Endian) -> core::result::Result<(), deku::error::DekuError>
+pub fn backhand::compression::Gzip::to_writer<W: std::io::Write + std::io::Seek>(&self, __deku_writer: &mut deku::writer::Writer<W>, endian: deku::ctx::Endian) -> core::result::Result<(), deku::error::DekuError>
-pub fn backhand::compression::Lz4::from_reader_with_ctx<R: std::io::Read>(__deku_reader: &mut deku::reader::Reader<'_, R>, endian: deku::ctx::Endian) -> core::result::Result<Self, deku::error::DekuError>
+pub fn backhand::compression::Lz4::from_reader_with_ctx<R: std::io::Read + std::io::Seek>(__deku_reader: &mut deku::reader::Reader<'_, R>, endian: deku::ctx::Endian) -> core::result::Result<Self, deku::error::DekuError>
-pub fn backhand::compression::Lz4::to_writer<W: std::io::Write>(&self, __deku_writer: &mut deku::writer::Writer<W>, endian: deku::ctx::Endian) -> core::result::Result<(), deku::error::DekuError>
+pub fn backhand::compression::Lz4::to_writer<W: std::io::Write + std::io::Seek>(&self, __deku_writer: &mut deku::writer::Writer<W>, endian: deku::ctx::Endian) -> core::result::Result<(), deku::error::DekuError>
-pub fn backhand::compression::Lzo::from_reader_with_ctx<R: std::io::Read>(__deku_reader: &mut deku::reader::Reader<'_, R>, endian: deku::ctx::Endian) -> core::result::Result<Self, deku::error::DekuError>
+pub fn backhand::compression::Lzo::from_reader_with_ctx<R: std::io::Read + std::io::Seek>(__deku_reader: &mut deku::reader::Reader<'_, R>, endian: deku::ctx::Endian) -> core::result::Result<Self, deku::error::DekuError>
-pub fn backhand::compression::Lzo::to_writer<W: std::io::Write>(&self, __deku_writer: &mut deku::writer::Writer<W>, endian: deku::ctx::Endian) -> core::result::Result<(), deku::error::DekuError>
+pub fn backhand::compression::Lzo::to_writer<W: std::io::Write + std::io::Seek>(&self, __deku_writer: &mut deku::writer::Writer<W>, endian: deku::ctx::Endian) -> core::result::Result<(), deku::error::DekuError>
-pub fn backhand::compression::Xz::from_reader_with_ctx<R: std::io::Read>(__deku_reader: &mut deku::reader::Reader<'_, R>, endian: deku::ctx::Endian) -> core::result::Result<Self, deku::error::DekuError>
+pub fn backhand::compression::Xz::from_reader_with_ctx<R: std::io::Read + std::io::Seek>(__deku_reader: &mut deku::reader::Reader<'_, R>, endian: deku::ctx::Endian) -> core::result::Result<Self, deku::error::DekuError>
-pub fn backhand::compression::Xz::to_writer<W: std::io::Write>(&self, __deku_writer: &mut deku::writer::Writer<W>, endian: deku::ctx::Endian) -> core::result::Result<(), deku::error::DekuError>
+pub fn backhand::compression::Xz::to_writer<W: std::io::Write + std::io::Seek>(&self, __deku_writer: &mut deku::writer::Writer<W>, endian: deku::ctx::Endian) -> core::result::Result<(), deku::error::DekuError>
-pub fn backhand::compression::Zstd::from_reader_with_ctx<R: std::io::Read>(__deku_reader: &mut deku::reader::Reader<'_, R>, endian: deku::ctx::Endian) -> core::result::Result<Self, deku::error::DekuError>
+pub fn backhand::compression::Zstd::from_reader_with_ctx<R: std::io::Read + std::io::Seek>(__deku_reader: &mut deku::reader::Rea...