Releases: wcampbell0x2a/backhand
Releases · wcampbell0x2a/backhand
v0.21.0
v0.20.0
v0.19.0
backhand
- Use feature
zlib-ng
forflate2
, which is enabled when compression optionGzip
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 theadd
andreplace
binaries. This is controllable withFilesystemWriter::set_no_duplicate_files
. (#603), (#594) - Increase speed of internal
HashMap
s, by switching toxxhash
and just using theinode
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
- Add
- 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
toadd
andreplace
to remove compression options from image after modification. - Add
--pad-len
toreplace
andadd
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...
v0.18.0
v0.17.0
v0.16.0
[v0.16.0] - 2024-04-25
backhand
- Simplify API by removing
FilesystemReader::alloc_read_buffers()
. This is now handled internally byFilesystemReader::reader()
(#530)
backhand-cli
- Add
x86_64-apple-darwin
support and release binary (#511) - Fix
--help
and correctly showgzip
support when usinggzip-zune-inflate
(#538) - Fix
--help
and correctly showxz
support when usingxz-static
(#541)
Dependencies
- Bump
zstd
from 0.13.0 to 0.13.1 (#518) - Bump
rayon
from 1.9.0 to 1.10.0 (#512) - Bump
codecov/codecov-action
from 4.1.0 to 4.3.0 (#514, #526) - Bump
obi1kenobi/cargo-semver-checks-action
from 2.3 to 2.4 (#507) - Bump
clap
from 4.5.2 to 4.5.4 (#513) - Bump
libdeflater
from 1.19.3 to 1.20.0 (#523) - Bump
dangoslen/dependabot-changelog-helper
from 3.8.1 to 3.9.0 (#516) - Bump
thiserror
from 1.0.58 to 1.0.59 (#534) - Bump
color-print
from 0.3.5 to 0.3.6 (#537) - Bump
clap_complete
from 4.5.1 to 4.5.2 (#525)
Complete API Updates
Click to expand
Removed items from the public API
=================================
-pub fn backhand::FilesystemReader<'b>::alloc_read_buffers(&self) -> (alloc::vec::Vec<u8>, alloc::vec::Vec<u8>)
Changed items in the public API
===============================
-pub fn backhand::FilesystemReaderFile<'a, 'b>::reader(&self, buf_read: &'a mut alloc::vec::Vec<u8>, buf_decompress: &'a mut alloc::vec::Vec<u8>) -> backhand::SquashfsReadFile<'a, 'b>
+pub fn backhand::FilesystemReaderFile<'a, 'b>::reader(&self) -> backhand::SquashfsReadFile<'a, 'b>
Added items to the public API
=============================
(none)
Full Diff: v0.15.0...v0.16.0
v0.15.0
[v0.15.0] - 2024-03-24
backhand
- Add support for
Socket
andNamedFIFO
Inodes in library and extraction binaries. Thanks (@tnias) (#472, #470)- Add
FilesytemWriter::push_fifo
andFilesystemWriter::push_socket
- Add
- Fix panic found with fuzz testing in
NodeHeader::from_inode
(#494) - Add tests for zstd compression support. Fix bug with zstd writer and added
zstd-safe
dependency (#504) - Added
inline
s to small public functions (#504) - Changed
FilesystemReader.cache
toRwLock
to reduce blocking time during fragment reading (#504) - Increase performance of reading uncompressed fragments (small files) heavy images by removing unnecessary clones of data (#504). Found by (@bryangarza) in (!503).
- Increased performance of reading inodes (#453)
- Reduce allocations within
Squashfs.dir_blocks
(#447) - Add pre-allocate before reading
inodes
(#437) - Prevent several bounds check failures found by fuzz testing (#499)
backhand-cli
- Bump MSRV to
1.74
forclap-4.5.1
update (#483)
backhand-test
- Reduced maximum allocation during testing by free'ing right after full usage (#504)
unsquashfs
- Performance: Remove progress bar Mutex lock when
--quiet
(#430)
Dependencies
- Bump
actions/upload-artifact
from 4.1.0 to 4.3.1 (#435, #446, #465) - Bump
env_logger
from 0.10.1 to 0.10.2 (#432) - Bump
rayon
from 1.8.0 to 1.9.0 (#431, #496) - Bump
clap
from 4.4.17 to 4.5.2 (#428, #500) - Bump
clap_complete
from 4.4.7 to 4.5.1 (#444, #445, #482) - Bump
codecov/codecov-action
from 3.1.4 to 4.1.0 (#448, #457, #458, #462, #488, #493) - Bump
obi1kenobi/cargo-semver-checks-action
from 2.2 to 2.3 (#449) - Bump
libc
from 0.2.152 to 0.2.153 (#459) - Bump
dangoslen/dependabot-changelog-helper
from 3.7.0 to 3.8.0 (#461) - Bump
thiserror
from 1.0.56 to 1.0.58 (#476, #502) - Bump
indicatif
from 0.17.7 to 0.17.8 (#477) - Bump
libdeflater
from 1.19.0 to 1.19.3 (#486, #498) - Bump
assert_cmd
from 2.0.13 to 2.0.14 (#484) - Bump
nix
from 0.27.1 to 0.28.0 (#489) - Bump
test-log
from 0.2.14 to 0.2.15 (#492) - Bump
tempfile
from 3.9.0 to 3.10.1 (#491) - Bump
actions/checkout
from 4.1.1 to 4.1.2 (#501)
v0.14.2
backhand
- Enable overflow-checks (#421)
- Add feature
gzip-zune-inflate
to add a decompress only option with speed improvements (#419) - Remove allocation for
impl From<BackhandError> for io::Error {
(#425)
backhand-cli
- Enable overflow-checks for dist builds (#421)
unsquashfs
- Use feature
gzip-zune-inflate
for dist build and speed improvements (#419) - Updated benchmarks to show improvement (#419)
Dependencies
- Bump
clap
from 4.4.12 to 4.4.17 (#417, #424) - Bump
thiserror
from 1.0.53 to 1.0.56 (#404) - Bump
actions/upload-artifact
from 4.0.0 to 4.1.0 (#423) - Bump
libc
from 0.2.151 to 0.2.152 (#408) - Bump
clap_complete
from 4.4.5 to 4.4.7 (#426) - Bump
assert_cmd
from 2.0.12 to 2.0.13 (#422) - Bump
console
from 0.15.7 to 0.15.8 (#413)
v0.14.1
backhand
Changes
- Fix path to project
README.md
forcrates.io
v0.14.0
Major changes were made to the organization of this repo, with the library backhand
now being separated from
the backhand-cli
package, which is used to install unsquashfs
, replace
, and add
.
backhand
Changes
- Following changes were done to allow multi-threaded applications (#278)
- Change
RefCell<Box<T>>
intoArc<Mutex<T>>
- Change
RefCell<T>
intoMutex<T>
- Change
Rc<T>
intoArc<T>
- Change
dyn CompressionAction
todyn CompressionAction + Send + Sync
forKind
uses - Change
BufReadSeek: BufRead + Seek {}
toBufReadSeek: BufRead + Seek + Send {}
- Change
- Allow user provided read/write files to not be static (@rbran) (#285)
- Bump MSRV to
1.67.1
- Allow creating and reading uncompressed files (@rbran) (#365)
- Allow calling
FilesystemWriter::write
with Owned and RefMut writer (@rbran) (#361) - Push dir, file, etc, with lifetimes unrelated to reader from
from_fs_reader
(@rbran) (#361)
For example, the following is now allowed:
- let mut output = File::create(&args.out).unwrap();
- if let Err(e) = filesystem.write(&mut output) {
+ let output = File::create(&args.out).unwrap();
+ if let Err(e) = filesystem.write(output) {
Bug Fix
- When creating an empty image using
FilesystemWriter::default()
, correctly create the ID table for UID and GID entries. Reported: (@hwittenborn) (!250), Fixed: (#275) - Remove manual
Clone
impl forFilesystemReaderFile
(#277) - Increase
DirectoryIndex::name_size
length from 100 to 255. (@eatradish) (!282), Fixed: (#283) - Prevent
push_file
"file within file", will now returnInvalidFilePath
(@rbran) (#364) - Fix
gid
anduid
forpush_dir_all(..)
(#360)
Security
backhand-cli
Changes to All
strip
andLTO
are enabled for release binaries- Fix macOS builds (#260)
- Bump MSRV to
1.73.0
to use now stabilizedstd::os::unix::fs::lchown
- Add color styling to help output (#387)
unsquashfs
- Changed name to
unsquashfs-backhand
(#356) - Add progress bar for a cleaner output when extracting files (#272)
- Add
--quiet
for not displaying progress bar and RUST_LOG output (#272) - Add multiple threads for extracing files, giving us the same performance in most cases as
squashfs-tools/unsquashfs
! (#278)
add
- Changed name to
add-backhand
(#356)
replace
- Changed name to
replace-backhand
(#356)
ci
- Add testing and release binaries for the following platforms:(#259)
aarch64-unknown-linux-musl
arm-unknown-linux-musleabi
x86_64-unknown-linux-musl
(previously already release supported)
- Testing and release binaries were not added for macOS, support was tested on that platform.
testing
- Replace curl in test dependency
test-assets
with ureq (#264) - Replace
zune-inflate
withlibdeflater
for custom decompression testing for reliability (#325)
Dependencies
- Bump
flate2
from 1.0.26 to 1.0.28 (#307) - Bump
jemallocator
from 0.5.0 to 0.5.4 (#305) - Bump
env_logger
from 0.10.0 to 0.10.1 (#341) - Bump
clap
from 4.4.7 to 4.4.12 (#340, #371, #376, #399) - Bump
dangoslen/dependabot-changelog-helper
from 3.5.0 to 3.7.0 (#342, #369) - Bump
tracing-subscriber
from 0.3.17 to 0.3.18 (#347) - Bump
byte-unit
from 4.0.19 to 5.0.3 (#367) - Bump
actions/labeler
from 4 to 5 (#377) - Bump
test-log
from 0.2.13 to 0.2.14 (#378) - Bump
clap_complete
from 4.4.4 to 4.4.5 (#393) - Bump
thiserror
from 1.0.51 to 1.0.53 (#391, #401) - Bump
actions/upload-artifact
from 3.1.3 to 4.0.0 (#380) - Bump
tempfile
from 3.8.1 to 3.9.0 (#398) - Bump
document-features
from 0.2.7 to 0.2.8 (#400)