:luggage: @compression-algorithm/lempel-ziv
Lempel-Ziv lossless data compression algorithms for JavaScript. See docs.
:warning: Depending on your environment, the code may require
regeneratorRuntime
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