Spaces:
Sleeping
Sleeping
File size: 1,072 Bytes
6655e35 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | /// <reference types="node" />
/**
* Convert a little-endian buffer into a BigInt.
* @param buf The little-endian buffer to convert
* @returns A BigInt with the little-endian representation of buf.
*/
export declare function toBigIntLE(buf: Buffer): bigint;
/**
* Convert a big-endian buffer into a BigInt
* @param buf The big-endian buffer to convert.
* @returns A BigInt with the big-endian representation of buf.
*/
export declare function toBigIntBE(buf: Buffer): bigint;
/**
* Convert a BigInt to a little-endian buffer.
* @param num The BigInt to convert.
* @param width The number of bytes that the resulting buffer should be.
* @returns A little-endian buffer representation of num.
*/
export declare function toBufferLE(num: bigint, width: number): Buffer;
/**
* Convert a BigInt to a big-endian buffer.
* @param num The BigInt to convert.
* @param width The number of bytes that the resulting buffer should be.
* @returns A big-endian buffer representation of num.
*/
export declare function toBufferBE(num: bigint, width: number): Buffer;
|