Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function deflateDecode
import { deflateDecode } from "https://deno.land/x/simple_utility@v0.5.4/src/deflate.ts";

Decompress "deflate" format binary. Cannot decompress such as "gzip" (RFC1952) or "zlib" (RFC1950) that contain header.

Examples

Example 1

const bin = await Deno.readFile("./file");
const converted = await deflateEncode(bin);
const restored = await deflateDecode(converted);

Parameters

data: Uint8Array

Returns

Promise<Uint8Array>