@eonasdan/lz-string

1.0.3 • Public • Published

String Compression

I forked matschik version which is a port of the original lz-string.

I reduced the redundant code and used rollup to produce both an ES6+ and UMD scripts

Install

$ npm install @eonasdan/lz-string

Example

import { compress, decompress } from '@eonasdan/lz-string'

const compressed = compress('hello world');
const decompressed = decompress(compressed);

API

compressToBase64(input: string): string;

decompressFromBase64(input: string): string | null;

compressToURL(input: string): string;

decompressFromURL(input: string): string | null;

compress(uncompressed: string): string;

decompress(compressed: null | string): string | null;

Readme

Keywords

none

Package Sidebar

Install

npm i @eonasdan/lz-string

Weekly Downloads

12

Version

1.0.3

License

MIT

Unpacked Size

59.6 kB

Total Files

10

Last publish

Collaborators

  • eonasdan