-
Make sure you have NodeJS installed
-
Run the generator file like so:
node generator.js 1000 generated.txt
(1000 is the generated file length, generated is the file name you want to generate) -
Run the compressor file like so:
node compressor.js generated.txt compressed.txt
(generated & compressed are the input and output files) -
Run the decompressor file like so:
node decompressor.js compressed.txt decompressed.txt
(compressed & decompressed are the input and output files) -
If you want to run a simple test script to make sure it works or to see how much space is being saved for different file sizes, use test.js:
node test.js 1000
(1000 is the data length used for the test)
kinging123 / jscompressor Goto Github PK
View Code? Open in Web Editor NEWMy implementation of some basic compression algorithms