Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhermsmeier/node-apple-data-compression
Apple Data Compression (ADC) Scheme
https://github.com/jhermsmeier/node-apple-data-compression
adc apple compression decompression disk-image dmg udif
Last synced: 11 days ago
JSON representation
Apple Data Compression (ADC) Scheme
- Host: GitHub
- URL: https://github.com/jhermsmeier/node-apple-data-compression
- Owner: jhermsmeier
- License: mit
- Created: 2017-02-19T12:35:15.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-12T05:58:34.000Z (about 6 years ago)
- Last Synced: 2025-01-08T06:16:52.586Z (18 days ago)
- Topics: adc, apple, compression, decompression, disk-image, dmg, udif
- Language: JavaScript
- Size: 223 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Apple Data Compression (ADC) Scheme
[![npm](https://img.shields.io/npm/v/apple-data-compression.svg?style=flat-square)](https://npmjs.com/package/apple-data-compression)
[![npm license](https://img.shields.io/npm/l/apple-data-compression.svg?style=flat-square)](https://npmjs.com/package/apple-data-compression)
[![npm downloads](https://img.shields.io/npm/dm/apple-data-compression.svg?style=flat-square)](https://npmjs.com/package/apple-data-compression)
[![build status](https://img.shields.io/travis/jhermsmeier/node-apple-data-compression/master.svg?style=flat-square)](https://travis-ci.org/jhermsmeier/node-apple-data-compression)The Apple Data Compression (ADC) scheme relies on both [run-length encoding](https://en.wikipedia.org/wiki/Run-length_encoding)
and pointing to data in a [sliding dictionary](https://en.wikipedia.org/wiki/Dictionary_coder).## Install via [npm](https://npmjs.com)
```sh
$ npm install --save apple-data-compression
```## Related Modules
- [Apple Universal Disk Image Format](https://github.com/jhermsmeier/node-udif)
## Usage
```js
var adc = require( 'apple-data-compression' )
```### Sync decompression
```js
var result = adc.decompress( buffer )
```### Streaming
```js
var transform = new adc.Decompressor()
// OR var transform = adc.createDecompress()fs.createReadStream( filename )
.pipe( transform )
.on( 'data', ( chunk ) => {
// ...
})
```