Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/simple_utility/mod.ts>streamDecode

Useful snippet collection.
Go to Latest
function streamDecode
Re-export
import { streamDecode } from "https://deno.land/x/simple_utility@v1.5.2/mod.ts";

Convert from stream to binary.

Examples

Example 1

const rs = streamEncode(new Uint8Array([0x00, 0x01, 0x02]));
const data = await streamDecode(rs);

Parameters

rs: ReadableStream<Uint8Array>

Returns

Promise<Uint8Array>