Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pop-os/debarchive
Rust crate which provides direct access to files within a Debian archive
https://github.com/pop-os/debarchive
Last synced: 3 months ago
JSON representation
Rust crate which provides direct access to files within a Debian archive
- Host: GitHub
- URL: https://github.com/pop-os/debarchive
- Owner: pop-os
- License: mit
- Created: 2018-10-03T20:08:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-05T14:36:09.000Z (over 3 years ago)
- Last Synced: 2024-09-29T02:40:56.834Z (4 months ago)
- Language: Rust
- Size: 4.88 KB
- Stars: 13
- Watchers: 10
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-cn - pop-os/debarchive
- awesome-rust - pop-os/debarchive
- awesome-rust-zh - pop-os/debarchive
README
# debarchive
This Rust crate provides direct access to files within a Debian archive. This crate is used by
our [debrep utility](https://github.com/pop-os/debrepbuild) to generate the `Packages` and
`Contents` files for generated apt repositories.## Features
- [x] Reading files from archives
- [x] Extracting files from archives
- [ ] Writing new debian archives## Examples
```rust
extern crate debarchive;use debarchive::Archive;
use std::path::Path;fn main() {
let path = &Path::new("name_version_arch.deb");
let archive = Archive::new(path).unwrap();
archive.data(|entry| {
if let Ok(path) = entry.path() {
println!("data: {}", path.display());
}
});let control_map = archive.control_map().unwrap();
println!("Control: {:#?}", control_map);
}