deno_std
deno_std copied to clipboard
Add a transform stream version for base64 encoding/decoding
Is your feature request related to a problem? Please describe.
I'd like to encode to base64 a stream of binary data without having to load it all on memory.
Describe the solution you'd like
A streamed version of base64 encoder & decoder. Eg:
import { EncoderStream } from "https://deno.land/std@$STD_VERSION/encoding/base64.ts";
source.pipeThrough(new EncoderStream()).pipeTo(dest)
Describe alternatives you've considered
I've found this library that works with Node streams https://github.com/mazira/base64-stream I haven't tried if it works on Deno yet, and I don't know if there is a way to convert a Node Transform stream into a web TransformStream.
Are you able to elaborate on your use case?