tsmaz
Version:
TypeScript port of the smaz string compression library
14 lines (13 loc) • 411 B
TypeScript
export default class Smaz {
private readonly buffer;
private readonly verbatim;
private readonly trie;
private readonly codebook;
constructor(codebook: string[]);
compress(str: string): Uint8Array;
UNSAFE_compress(str: string): Uint8Array;
decompress(arr: Uint8Array): string;
getCompressedSize(str: string): number;
private inplaceCompress;
private flushVerbatim;
}