adc 0.2.1

Rust implementation of the Apple Data Compression scheme used in DMG images.
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented1 out of 3 items with examples
  • Size
  • Source code size: 12.08 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.66 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • citruz/adc-rs
    2 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • citruz

adc-rs

Build and Testcrates.io

A native rust implementation of the Apple Data Compression scheme used for example in DMG images. Supports decompression only.

Documentation

# Cargo.toml
[dependencies]
adc = "0.2"

Example

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);

Changelog

0.2.1

  • Fixed two decoding bugs

0.2.0

  • Switched to an API based on the Read trait (breaking change)

0.1.0

  • Initial release