#cpio #format #content #read #file #ascii

no-std cpio_reader

A library to read the contents of cpio files

2 releases

0.1.1 Jul 21, 2022
0.1.0 Aug 23, 2021

#181 in No standard library

Download history 562/week @ 2023-12-06 401/week @ 2023-12-13 156/week @ 2023-12-20 196/week @ 2023-12-27 311/week @ 2024-01-03 200/week @ 2024-01-10 370/week @ 2024-01-17 384/week @ 2024-01-24 606/week @ 2024-01-31 342/week @ 2024-02-07 635/week @ 2024-02-14 293/week @ 2024-02-21 398/week @ 2024-02-28 525/week @ 2024-03-06 424/week @ 2024-03-13 495/week @ 2024-03-20

1,883 downloads per month
Used in 3 crates (2 directly)

MIT/Apache

18KB
340 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

~91KB