Squashfs_reader
Squashfs_reader is a rust crate offering full read-only access to squashfs archive files. It offers an api similar to std::io.
Features
- Pure Rust: Implementation of the entire SquashFS format specification.
- Full Compression Support: All possible compression formats (gzip, lzma, xz, lzo, lz4, and zstd) are supported.
- Thread Safety: This library is fully thread-safe.
- Caching: All accessed metadata and data blocks are cached using
quick_cacheto prevent unnecessary decompressions. The cache size can be configured. - Familiar API: Directory iteration is supported with an API similar to
std::fs::ReadDir, and files implement thestd::io::Readandstd::io::Seektraits.
Example
use io;
use FileSystem;
Compression and features
best_performance(default) - Uses external (non-Rust) libraries when they offer better performance (liblzmaandzstd-safe).only_rust- Only has Rust dependencies, but may offer lower performance when using some compression formats.
If both features are enabled, only_rust will be prioritized.
Safety
This crate is entirely written in safe Rust (it uses #![forbid(unsafe_code)]). However, please note that some dependencies may contain unsafe code.