Crates.io | adc |
lib.rs | adc |
version | 0.2.1 |
source | src |
created_at | 2020-07-21 21:40:01.868709 |
updated_at | 2020-09-16 20:57:08.679288 |
description | Rust implementation of the Apple Data Compression scheme used in DMG images. |
homepage | |
repository | https://github.com/citruz/adc-rs |
max_upload_size | |
id | 267799 |
size | 12,231 |
A native rust implementation of the Apple Data Compression scheme used for example in DMG images. Supports decompression only.
# Cargo.toml
[dependencies]
adc = "0.2"
use adc::AdcDecoder;
use std::io::Read;
let input: &[u8] = &[0x83, 0xfe, 0xed, 0xfa, 0xce, 0x00, 0x00, 0x40, 0x00, 0x06];
let mut d = AdcDecoder::new(input);
let mut data = vec![0; 11];
let bytes_out = match d.read_exact(&mut data) {
Ok(val) => val,
Err(err) => panic!("error: {:?}", err),
};
println!("{:?} bytes decompressed", bytes_out);
0.2.1
0.2.0
Read
trait (breaking change)0.1.0