Lempel-Ziv lossless data compression algorithms for JavaScript. See docs.
⚠️ Depending on your environment, the code may requireregeneratorRuntime
to be defined, for instance by importing regenerator-runtime/runtime.
import {lz78} from '@compression-algorithm/lempel-ziv' ;
const {dict, encode, decode} = lz78;
[...decode(dict(), encode(dict(), 'abcd'))].join(''); // abcd