https://github.com/toku-sa-n/cpio_reader
A Rust library to read the contents of cpio files
https://github.com/toku-sa-n/cpio_reader
cpio rust
Last synced: about 1 month ago
JSON representation
A Rust library to read the contents of cpio files
- Host: GitHub
- URL: https://github.com/toku-sa-n/cpio_reader
- Owner: toku-sa-n
- License: apache-2.0
- Created: 2021-03-31T02:03:59.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-11-28T04:35:20.000Z (over 1 year ago)
- Last Synced: 2025-03-25T08:23:00.213Z (about 2 months ago)
- Topics: cpio, rust
- Language: Rust
- Homepage: https://docs.rs/cpio_reader
- Size: 21.5 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# `cpio_reader`
[](https://github.com/toku-sa-n/cpio_reader/actions)
[](https://crates.io/crates/cpio_reader)

[](https://docs.rs/cpio_reader)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 FormatThis library is `#![no_std]` compatible.
## Examples
```rust
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
* Apache License, Version 2.0
([LICENSE-APACHE](LICENSE-APACHE) or )
* MIT license
([LICENSE-MIT](LICENSE-MIT) or )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.