1 unstable release
0.4.1 | Dec 14, 2024 |
---|
#705 in Filesystem
101 downloads per month
Used in bluesky-firehose-stream
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
~1.8–2.8MB
~55K SLoC