deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

Add a transform stream version for base64 encoding/decoding

Open davbrito opened this issue 2 years ago • 1 comments

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.

davbrito avatar Jan 03 '23 02:01 davbrito

Are you able to elaborate on your use case?

iuioiua avatar May 17 '24 00:05 iuioiua