Package Exports
- lz-ts
- lz-ts/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lz-ts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
lz-ts
LZ-based compression algorithm for TypeScript projects (Browser, Node.js).
This project is a TypeScript port of the original package lz-string
using modern tooling.
Setup
yarn add lz-ts
npm i lz-ts
Usage
UTF16 encoded string compression
import { compress, decompress } from 'lz-ts'
const compressed = compress('input')
const decompressed = decompress(compressed)
URI encoded string compression
import { compressToURI, decompressFromURI } from 'lz-ts'
const compressedURI = compressToURI('input')
const decompressedURI = decompressFromURI(compressed)
Limitations
This project intentionally doesn't implement the base64
encoding.
Test
yarn test