javascript-binary-converter
Version:
A utility package to quickly handle and convert various Javascript binary objects
27 lines (26 loc) • 894 B
TypeScript
import { BytesArray } from "../sharedTypes";
import { BaseBytesConverter } from "./BaseBytesConverter";
export default class BytesConverter extends BaseBytesConverter {
protected original: BytesArray;
constructor(original: BytesArray);
private _getIntegers;
toUint8Array(): Uint8Array;
toInt8Array(): Int8Array;
toUint16Array(): Uint16Array;
toInt16Array(): Int16Array;
toUint32Array(): Uint32Array;
toInt32Array(): Int32Array;
toBigInt64Array(): BigInt64Array;
toBigUint64Array(): BigUint64Array;
toFloat32Array(): Float32Array;
/**
* Defaults: isSigned = false, integerSize = 8
*/
toIntegers({ isSigned, integerSize }?: {
isSigned?: boolean;
integerSize?: 8 | 16 | 32 | 64;
}): (number | bigint)[];
toHexString({ isSigned }?: {
isSigned?: boolean;
}): string[];
}