#cpio #content #read

no-std cpio_reader

A library to read the contents of cpio files

3 releases

0.1.2 May 17, 2025
0.1.1 Jul 21, 2022
0.1.0 Aug 23, 2021

#92 in No standard library

Download history 549/week @ 2025-10-10 380/week @ 2025-10-17 532/week @ 2025-10-24 197/week @ 2025-10-31 212/week @ 2025-11-07 203/week @ 2025-11-14 506/week @ 2025-11-21 719/week @ 2025-11-28 956/week @ 2025-12-05 1094/week @ 2025-12-12 1134/week @ 2025-12-19 860/week @ 2025-12-26 950/week @ 2026-01-02 1593/week @ 2026-01-09 1009/week @ 2026-01-16 626/week @ 2026-01-23

4,275 downloads per month
Used in 3 crates (2 directly)

MIT/Apache

19KB
341 lines

cpio_reader

GitHub Actions Crates.io Crates.io docs.rs

A library to read the contents of the cpio file. (.cpio)

This library is based on the design written man 5 cpio and supports these four formats.

  • Old Binary Format
  • Portable ASCII Format
  • New ASCII Format
  • New CRC Format

This library is #![no_std] compatible.

Examples

use std::fs;

let cpio = fs::read("tests/newc.cpio").unwrap();

for entry in cpio_reader::iter_files(&cpio) {
    println!("Entry name: {}, content: {:?}", entry.name(), entry.file());
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~100KB