1 unstable release
new 0.4.1 | Dec 14, 2024 |
---|
#5 in #car
115 downloads per month
1.5MB
714 lines
rs-car-sync
This is a fork of rs-car that only uses standard sync rust api.
The main motivation is to get rid of useless contaminating async api when reading a car file from memory.
Rust implementation of the CAR specifications, both CARv1 and CARv2.
Usage
let mut file = std::fs::File::open(car_filepath).unwrap();
let block_iterator = decode_car_stream(&mut file, true).unwrap();
while let Some(item) = block_iterator.next() {
let (cid, block) = item.unwrap();
// Do something with CAR block
}
lib.rs
:
Rust implementation of the CAR specifications, both CARv1 and CARv2.
Usage
- To get a block iterator [
CarReader::new()
] - To read all blocks in memory [car_read_all]
Dependencies
~3.5MB
~76K SLoC