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

x/polkadot/util/compact/addLength.ts>compactAddLength

Package publishing for deno.land/x/polkadot
Go to Latest
function compactAddLength
import { compactAddLength } from "https://deno.land/x/polkadot@0.2.17/util/compact/addLength.ts";

Examples

import { compactAddLength } from 'https://deno.land/x/polkadot@0.2.17/util/mod.ts';

console.log(compactAddLength(new Uint8Array([0xde, 0xad, 0xbe, 0xef]))); // Uint8Array([4 << 2, 0xde, 0xad, 0xbe, 0xef])

Parameters

input: Uint8Array

Returns

Uint8Array