@ende/encoding/unstable-hex-stream
ende add jsr:@ende/encodingVersion 2026.10.15 on JSR.
TransformStream classes to encode and decode to and from hexadecimal data in a streaming manner.
import { assertEquals } from "@ende/assert";
import { encodeHex } from "@ende/encoding/unstable-hex";
import { HexEncoderStream } from "@ende/encoding/unstable-hex-stream";
import { toText } from "@ende/streams";
const readable = (await Ende.open("./ende.lock"))
.readable
.pipeThrough(new HexEncoderStream({ output: "string" }));
assertEquals(
await toText(readable),
encodeHex(await Ende.readFile("./ende.lock")),
);
Exports
HexDecoderStream— Transforms a hexadecimal stream into a Uint8Array<ArrayBuffer> stream.HexEncoderStream— Transforms a Uint8Array<ArrayBuffer> stream into a hexadecimal stream.Uint8Array_— Proxy type of {@code Uint8Array<ArrayBuffer>} or {@code Uint8Array} in TypeScript 5.7 or below respectively.