#app-image #squash-fs #linux

squishy

A convenient high level library for reading SquashFS files

9 unstable releases (4 breaking)

0.5.0 Mar 31, 2026
0.4.0 Dec 28, 2025
0.3.2 Jan 14, 2025
0.3.0 Dec 1, 2024
0.1.1 Nov 10, 2024

#917 in Filesystem

Download history 449/week @ 2025-12-25 94/week @ 2026-01-01 66/week @ 2026-01-08 305/week @ 2026-01-15 93/week @ 2026-01-22 115/week @ 2026-01-29 25/week @ 2026-02-05 204/week @ 2026-02-12 199/week @ 2026-02-19 55/week @ 2026-02-26 64/week @ 2026-03-05 49/week @ 2026-03-12 31/week @ 2026-03-19 48/week @ 2026-03-26 35/week @ 2026-04-02 69/week @ 2026-04-09

187 downloads per month
Used in 5 crates (2 directly)

MIT license

150KB
3.5K SLoC

🗜️ Squishy

License: MIT

A convenient wrapper around the backhand library for reading and extracting files from SquashFS filesystems. Provides both a library and CLI tool.

Features

  • Read and extract files from SquashFS filesystems
  • Traverse filesystem entries
  • Handle symlinks with cycle detection
  • Search for files using custom predicates

Usage

Add this to your Cargo.toml:

[dependencies]
squishy = "0.2.1"

Example

use squishy::{SquashFS, EntryKind};
use std::path::Path;

// Open a SquashFS file
let squashfs = SquashFS::from_path(&Path::new("example.squashfs"))?;

// List all entries
for entry in squashfs.entries() {
    println!("{}", entry.path.display());
}

// Optionally, parallel read with rayon
use rayon::iter::ParallelIterator;
for entry in squashfs.par_entries() {
    println!("{}", entry.path.display());
}

// Write file entries to disk
for entry in squashfs.entries() {
    if let EntryKind::File(file) = entry.kind {
        squashfs.write_file(file, "/path/to/output/file")?;
    }
}

// Read a specific file
// Note: the whole file content will be loaded into memory
let contents = squashfs.read_file("path/to/file.txt")?;

License

This project is licensed under the [MIT] License - see the LICENSE file for details.

Dependencies

~12–17MB
~239K SLoC