Skip to main content
Module

std/encoding/binary.ts>getNBytes

Deno standard library
Go to Latest
function getNBytes
import { getNBytes } from "https://deno.land/std@0.80.0/encoding/binary.ts";

Reads n bytes from r.

Resolves it in a Uint8Array, or throws Deno.errors.UnexpectedEof if n bytes cannot be read.

Returns

Promise<Uint8Array>