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

x/polkadot/util/compact/index.ts>compactStripLength

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

Examples

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

console.log(compactStripLength(new Uint8Array([2 << 2, 0xde, 0xad]))); // [2, Uint8Array[0xde, 0xad]]

Parameters

input: Uint8Array

Returns

[number, Uint8Array]