#no-std #cpio

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

#89 in No standard library

Download history 111/week @ 2022-12-01 85/week @ 2022-12-08 81/week @ 2022-12-15 68/week @ 2022-12-22 46/week @ 2022-12-29 24/week @ 2023-01-05 54/week @ 2023-01-12 29/week @ 2023-01-19 51/week @ 2023-01-26 77/week @ 2023-02-02 192/week @ 2023-02-09 48/week @ 2023-02-16 62/week @ 2023-02-23 39/week @ 2023-03-02 316/week @ 2023-03-09 547/week @ 2023-03-16

988 downloads per month
Used in xeno-rs

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

~52KB