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

x/willow_utils/src/encoding/encoding.ts>decodeCompactWidth

TypeScript typings and utilities for the Willow protocol.
Latest
function decodeCompactWidth
import { decodeCompactWidth } from "https://deno.land/x/willow_utils@1.0.0/src/encoding/encoding.ts";

Decode a variable width integer. Uses the bytelength of the passed encoding to determine the compact width.

Parameters

encoded: Uint8Array

Returns

number | bigint