import url from "@kpv/encoder/web/kpv_encoder_bg.wasm?url";
import init, { encode_v0_0_1, decode_v0_0_1 } from "@kpv/encoder/web";
init(url).then(() => {
const input = new Uint8Array(Array.from({ length: 9999 }, () =>
Math.floor(Math.random() * 256)
));
const bits = decode_v0_0_1(input);
encode_v0_0_1(bits);
});
const { encode_v0_0_1, decode_v0_0_1 } = require("@kpv/encoder");
const input = Array.from({ length: 9999 }, () =>
Math.floor(Math.random() * 256)
);
const bits = decode_v0_0_1(input);
encode_v0_0_1(bits);