Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

std/encoding/binary.ts>readExact

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function readExact
Deprecated
Deprecated

(will be removed after 0.205.0) Use ReadableStreamBYOBReader to read exact number of bytes.

Reads the exact number of bytes from r required to fill b.

Throws Deno.errors.UnexpectedEof if n bytes cannot be read.

import { readExact } from "https://deno.land/std@0.205.0/encoding/binary.ts";

Parameters

b: Uint8Array