Comparing version 1.3.7 to 2.0.0
{ | ||
"author": "Nathan Rugg <nmrugg@gmail.com>", | ||
"name": "lzma", | ||
"description": "A standalone JavaScript implementation of the Lempel-Ziv-Markov chain (LZMA) compression algorithm", | ||
"version": "1.3.7", | ||
"homepage": "http://nmrugg.github.com/LZMA-JS/", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/nmrugg/LZMA-JS.git" | ||
}, | ||
"main": "lzma.js", | ||
"readme": "readme.md" | ||
"author": "Nathan Rugg <nmrugg@gmail.com>", | ||
"name": "lzma", | ||
"description": "A standalone JavaScript implementation of the Lempel-Ziv-Markov chain (LZMA) compression algorithm", | ||
"version": "2.0.0", | ||
"homepage": "http://nmrugg.github.com/LZMA-JS/", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/nmrugg/LZMA-JS.git" | ||
}, | ||
"main": "lzma.js", | ||
"readme": "readme.md", | ||
"devDependencies": { | ||
"uglify-js": "~2.4.16" | ||
} | ||
} |
@@ -5,11 +5,24 @@ LZMA in a Browser | ||
[LZMA-JS](https://github.com/nmrugg/LZMA-JS) is a JavaScript implementation of the Lempel-Ziv-Markov chain (LZMA) compression algorithm. | ||
The JavaScript, CSS, and HTML is licensed under the MIT license. See LICENSE for more details. | ||
The JavaScript, CSS, and HTML is licensed under the MIT license. | ||
It is based on [gwt-lzma](http://code.google.com/p/gwt-lzma/), which is a port of the LZMA SDK from | ||
Java into JavaScript. The original Java code is licensed under the Apache License 2.0 license. | ||
What's New in 2.0 | ||
--- | ||
<b>Speed</b> & <b>Size</b> | ||
LZMA-JS 2.0 now minifies to almost half of 1.x and in some cases is 1,000x faster (particularly with high compression). | ||
It is also more modular. The compression and decompression algorithms can be optionally separated to shrink the file size even more. | ||
Here are some file size stats: | ||
| Filename | Method(s) | Minified | Gzipped | | ||
|:---------------|:--------------|---------:|--------:| | ||
| lzma_worker.js | both | 29.3 KB | 11.2 KB | | ||
| lzma-c.js | compression | 22.7 KB | 9.0 KB | | ||
| lzma-d.js | decompression | 10.5 KB | 4.4 KB | | ||
Demos | ||
--- | ||
Live demos can be found [here](http://nmrugg.github.com/LZMA-JS/ "Demos"). | ||
Live demos can be found [here](http://nmrugg.github.io/LZMA-JS/ "Demos"). | ||
@@ -37,3 +50,5 @@ How to Use | ||
/// To compress: | ||
///NOTE: mode can be 1-9 (1 is fast but not as good; 9 will probably make your browser crash). | ||
///NOTE: mode can be 1-9 (1 is fast and pretty good; 9 is very slow and probably a bit better). | ||
/// I suggest keeping mode low, like 1-3. | ||
/// And by the way, 9 is not always the smallest. | ||
my_lzma.compress(string, mode, on_finish(result) {}, on_progress(percent) {}); | ||
@@ -51,3 +66,3 @@ | ||
and load it with the following code: | ||
It can be loaded with the following code: | ||
@@ -63,7 +78,11 @@ var my_lzma = require("lzma").LZMA(); | ||
If the decompression progress is unable to be calculated, the on_progress() function will be triggered once with the value -1. | ||
If the decompression progress is unable to be calculated, the on_progress() function will be triggered once with the value <code>-1</code>. | ||
LZMA-JS will try to use Web Workers if they are available. If the environment does not support web workers, | ||
LZMA-JS will try to use Web Workers if they are available. If the environment does not support Web Workers, | ||
it will just do something else, and it won't pollute the global scope. | ||
LZMA-JS is based on [gwt-lzma](http://code.google.com/p/gwt-lzma/), which is a port of the LZMA SDK from | ||
Java into JavaScript. The original Java code is licensed under the Apache License 2.0 license. | ||
But I don't want to use Web Workers | ||
@@ -70,0 +89,0 @@ --- |
@@ -1,2 +0,3 @@ | ||
/// This code is licensed under the MIT License. See LICENSE for more details. | ||
//! © 2015 Nathan Rugg <nmrugg@gmail.com> | MIT | ||
/// See LICENSE for more details. | ||
@@ -3,0 +4,0 @@ /// Does the environment support web workers? If not, let's load the worker manually (without polluting the global scope). |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1953895
29
10722
100
1
2
4
1