Playground enhancements

This commit is contained in:
2025-07-15 19:58:58 -04:00
parent 3289c95e6a
commit bb2ae861b3
73 changed files with 834 additions and 451 deletions

View File

@@ -0,0 +1,16 @@
import test from "node:test";
import assert from "node:assert";
import { readFileSync } from "node:fs";
import { deflate } from "./deflate.ts";
import { inflate } from "./inflate.ts";
import { b64encode } from "./base64.ts";
test('round trip', ()=>{
let src = readFileSync('src/inflate.ts','utf8')
let smol = deflate(new TextEncoder().encode(src))
let big = inflate(smol)
assert.equal(src, new TextDecoder().decode(big))
console.log(src.length, smol.length, b64encode(smol).length)
})