Dev Helpers
← Back

Round-trip deflate

Round-trip deflate using Node.js.

Open this example in the interactive library

Source code

import * as z from "node:zlib";
const data = Buffer.from("sample sample sample");
console.log(z.inflateSync(z.deflateSync(data)).toString());

Sample output

sample sample sample