Skip to content

Releases: wcampbell0x2a/backhand

v0.25.1

Choose a tag to compare

@github-actions github-actions released this 28 Feb 19:40
4ac463b

backhand

  • v3: Add kinds: BE_V3_1_LZMA_SWAP and LE_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_swap and be_v3_1_lzma_swap

v0.25.0

Choose a tag to compare

@github-actions github-actions released this 14 Feb 21:10

[v0.25.0] - 2025-02-14

backhand

backhand-cli

  • Update depends
  • Remove libc depend

fuzz

  • Update depends

v0.24.1

Choose a tag to compare

@github-actions github-actions released this 18 Jan 18:59
b5b36ea

backhand

backhand-cli

  • Update dependencies

v0.24.0

Choose a tag to compare

@github-actions github-actions released this 07 Dec 04:32
87727cd

[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_0
  • le_v3_0
  • be_v3_0_lzma
  • le_v3_0_lzma
  • netgear_be_v3_0_lzma
  • netgear_le_v3_0_lzma

Features:

  • v3
  • v3_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 of Vec

backhand-cli

  • unsquashfs: Try all kinds by default when --kind isn't specified
  • unsquashfs: Improve error output
  • Update to 2024 edition
  • Bump MSRV to 1.86

v0.23.0

Choose a tag to compare

@github-actions github-actions released this 20 Jun 04:01
0e61bb4

backhand

  • Add feature parallel, which enables internal parallelization when de-compressing data. When parallel is 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 liblzma instead of xz2. This bumps the version of XZ used to 5.8.1. (#712)
    • This also removes the need for HAVE_DECODER defines/CFLAGS when building xz, as liblzma enables them when building by default.

backhand-cli

  • unsquashfs: Properly flush the file writer

backhand-cli

  • Use backhand features parallel by default (and in release builds). Exposed by using backhand-parallel.

v0.22.0

Choose a tag to compare

@github-actions github-actions released this 03 May 03:58
7b46efc

backhand

  • Update deku to v0.19.0 (#710)
  • Update MSRV to 1.84

backhand-cli

  • Update MSRV to 1.84

v0.21.0

Choose a tag to compare

@github-actions github-actions released this 08 Mar 21:48
3fa33f8

backhand

  • Use zlib-rs as the default implementation for flate2, added feature gzip-zlib-ng to access previous behavior (#697)
  • Remove gzip-zune-inflate, as this had minimal usage (#697)
  • Bump MSRV to 1.81 (#693)
  • Add lz4 compression and decompression, thanks @jeromegn! (#701)

v0.20.0

Choose a tag to compare

@github-actions github-actions released this 18 Jan 14:29
9a3e707

backhand

  • Remove incorrect check for ExtendedDirectory index count (#691)
  • Correctly support ExtendedFile (#691)

v0.19.0

Choose a tag to compare

@github-actions github-actions released this 01 Dec 22:57
465614d

backhand

  • Use feature zlib-ng for flate2, which is enabled when compression option Gzip is 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 the add and replace binaries. This is controllable with FilesystemWriter::set_no_duplicate_files. (#603), (#594)
  • Increase speed of internal HashMaps, by switching to xxhash and just using the inode as the key in other places.
  • Changed SuperBlock::Flags to be public.
  • Add non-standard CompressionOptions support (#584)
    • Add CompressionAction::compression_options to override the default compression options emitted during writing.
    • Add FilesystemWriter::set_emit_compression_options
  • Support sparse file extraction (#624)
  • Add x86_64-pc-windows-gnu support (@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-options to add and replace to remove compression options from image after modification.
  • Add --pad-len to replace and add to control the length of end-of-image padding (#604)
  • Bump MSRV to 1.77

Dependencies

  • Bump thiserror from 1.0.59 to 2.0.1 (#564, #578, #615, #633)
  • Bump libc from 0.2.154 to 0.2.162 (#557, #592, #616, #630)
  • Bump clap from 4.5.4 to 4.5.13 (#569, #574, #582)
  • Bump rustc-hash from 1.1.0 to 2.0.0 (#570)
  • Bump clap_complete from 4.5.2 to 4.5.13 (#575, #595)
  • Bump document-features from 0.2.8 to 0.2.10 (#576)
  • Bump zstd-safe from 7.1.0 to 7.2.1 (#585)
  • Bump flate2 from 1.0.30 to 1.0.35 (#593, #596, #617, #641)
  • Bump zstd from 0.13.1 to 0.13.2 (#601)
  • Bump env_logger from 0.11.3 to 0.11.5 (#602)
  • Bump libdeflater from 1.21.0 to 1.22.0 (#619)
  • Bump tempfile from 3.12.0 to 3.13.0 (#618)
  • Bump nix from 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...
Read more

v0.18.0

Choose a tag to compare

@github-actions github-actions released this 25 May 04:15
c43e5a6

backhand

  • Update MSRV to 1.72.1 (#524)

Dependencies

  • Bump deku from 0.16.0 to 0.17.0 (#524)
  • Bump libc from 0.2.153 to 0.2.154 (#546)