Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

LZ4 fast compression algorithm for NodeJS

branch: master
README.md

�g/**

  • Compress data into a block (no archive format) */ // Modules var path = require('path') var fs = require('fs')2 8lz4 P..') V � Input/Output fia i �File = process.argv[2] || 'test'Y o; + 3+ J �+ lz4.extension ? � = fs.readH RSync( )� �Allocate max,�size, to be sliced accordingly after cp u #� � = new Buffer(� �ncodeBound(� � .length) )

console.log('��ing %s to %s...',� ,h � ��startTimU�Date.now(�z �is synchronous� anative0� !ed- 0SizN YC � � @�javascriptQ J S�../lib/binL4').0 ] P aTiming� Ydelta� & -� d

if (K � �> 0) { � �� qfs.stat�Ox.size �@ '�Hb � %d bytesi � %dms (%dMb/s)' , y C j � � > 0 ? Math.r8a 100 *K� A/ ( 4 � * (1 << 20) ) *) P0 ) / � : 0 ) 4# ==.�5(0,�� �) } else7'X�could not� 'e R� }

fs.write^l� �, output )

Something went wrong with that request. Please try again.