lzString
LZ-based compression algorithm for JavaScript.
Note: This is a forked library of Pieroxy's lz-string library.
The library works in the same manner as Pieroxy's lz-string, except that this is a UMD build. The original library supported cjs, angular and requirejs. This on the other hand does not support angular. If you want to use it with angular, please continue reading below or click on the link above to download the original library instead.
This library comes with bug fixes which are not part of original library yet. If you still find any issues please feel free to log them.
install
$ npm install -g lznext
cjs:
const LZString = ;
es6:
;
es5:
angular 1:
angular;
Usage
Compress:
LZString; // Output: 〶惶@✰ӈ
De-compress:
LZstring; // Output: Hello World
Local Storage friendly:
LZString; // Output: ɢ䰭䰾怤ݴ䂼怩䠠
De-compress:
LZstring; // Output: Hello World
For more details on available methods, please refer to the original documentation.