Skip to main content
Module

x/frugal/dep/lz4.ts>compress

A frugal web framework
Go to Latest
function compress
import { compress } from "https://deno.land/x/frugal@0.2.1/dep/lz4.ts";

Compress a byte array using lz4.

import { compress } from "https://deno.land/x/lz4/mod.ts";
const text = new TextEncoder().encode("X".repeat(64));
console.log(text.length);                   // 64 Bytes
console.log(compress(text).length);         // 6  Bytes

Parameters

input: Uint8Array

Input data.

Returns

Uint8Array