JSPM

  • Created
  • Published
  • Downloads 92874
  • Score
    100M100P100Q160267F

Provides bindings to the native liblzma library

Package Exports

  • lzma-native

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lzma-native) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

lzma-native

Provides bindings to the native liblzma library

===========

Example usage:

var lzma = require('lzma-native');
var stream = new lzma.Stream();
stream.easyEncoder({preset: 6, check: lzma.CHECK_CRC32});

var input = fs.createReadStream(...);
var output = fs.createWriteStream(...);

input.pipe(stream.getStream()).pipe(output);

The API is loosely based on the native API, with the stream.getStream() method added for convenience. Methods like stream.code and lzma.crc32 accept Node.js Buffers as arguments.