mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 02:07:56 +00:00
14 lines
493 B
TypeScript
14 lines
493 B
TypeScript
/**
|
|
* @name compactStripLength
|
|
* @description Removes the length prefix, returning both the total length (including the value + compact encoding) and the decoded value with the correct length
|
|
* @example
|
|
* <BR>
|
|
*
|
|
* ```javascript
|
|
* import { compactStripLength } from '@pezkuwi/util';
|
|
*
|
|
* console.log(compactStripLength(new Uint8Array([2 << 2, 0xde, 0xad]))); // [2, Uint8Array[0xde, 0xad]]
|
|
* ```
|
|
*/
|
|
export declare function compactStripLength(input: Uint8Array): [number, Uint8Array];
|