Gathering detailed insights and metrics for lz-string
Gathering detailed insights and metrics for lz-string
Gathering detailed insights and metrics for lz-string
Gathering detailed insights and metrics for lz-string
npm install lz-string
Typescript conversion and bundler updates
Published on 20 Jun 2023
Changed to MIT license
Published on 20 Jun 2023
Minified version
Published on 20 Jun 2023
Fix for IE6&7
Published on 25 May 2015
amd loaders code and typescript support
Published on 26 Apr 2015
Bugfix in decompressFromEncodedURIComponent
Published on 25 Mar 2015
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
4,136 Stars
248 Commits
569 Forks
87 Watching
9 Branches
28 Contributors
Updated on 28 Nov 2024
TypeScript (77.12%)
Shell (14.81%)
JavaScript (8.07%)
Cumulative downloads
Total Downloads
Last day
-6.7%
2,287,377
Compared to previous day
Last week
2.4%
12,868,021
Compared to previous week
Last month
7.5%
53,946,626
Compared to previous month
Last year
21.4%
568,770,787
Compared to previous year
LZ-based compression algorithm for JavaScript
[!IMPORTANT] The file layout has changed in version 2, this is now a joint
commonjs
/esmodule
project so modern build tools should be happy with it, but if importing a file directly (such as in a direct javascript project) it is important to use the correct one.
[!TIP] The "old style" minified AMD file is available as
dist/index.umd.js
via various CDNs or package managers.
1$ npm install -g lz-string 2$ lz-string input.txt > output.txt
Home page for this program with examples, documentation and a live demo: http://pieroxy.net/blog/pages/lz-string/index.html
If installed globally there is a command line tool available, and a test suite that can use it to show things are working properly. If other langauges build a command line tool that supports the same arguments then the test suite can be run against them too.
1$ lz-string -h 2Usage: cli [options] [input-file] 3 4Use lz-string to compress or decompress a file 5 6Arguments: 7 input-file file to process, if no file then read from stdin 8 9Options: 10 -V, --version output the version number 11 -d, --decompress if unset then this will compress 12 -e, --encoder <type> character encoding to use (choices: "base64", "encodeduri", "raw", "uint8array", "utf16", default: "raw") 13 -v, --verify verify before returning (default: true) 14 -b, --binary <file> lz-string binary to use (default: "../dist/index.js") 15 -l, --legacy use legacy mode where uint8array decompression must be an even length 16 -o, --output <output-file> output file, otherwise write to stdout 17 -q, --quiet don't print any error messages 18 -h, --help display help for command
This lib has numerous ports to other languages, for server side processing, mostly. Here they are:
[!CAUTION] These are all developed separately, so if you are using two versions to transfer data (such as a client and server version) it is important to check that they are compatible and have identical behaviours on the data!
[!NOTE] Version 1.3.8 of this package had a slight change in the encoding which might impact compatibility.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
6 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 1/17 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More