UNPKG

gnablib

Version:

A lean, zero dependency library to provide a useful base for your project.

60 lines (59 loc) 1.97 kB
/*! Copyright 2023-2025 the gnablib contributors MPL-1.1 */ import { IUint, IUintMut } from '../interfaces/IUint.js'; declare const consoleDebugSymbol: unique symbol; export declare class U32 implements IUint<U32> { protected _arr: Uint32Array; protected _pos: number; protected readonly _name: string; readonly size32 = 1; protected constructor(_arr: Uint32Array, _pos?: number, _name?: string); get value(): number; protected _value(v: U32 | number): number; static fromInt(uint32: number): U32; static mount(arr: Uint32Array, pos?: number): U32; clone(): U32; clone32(): Uint32Array<ArrayBuffer>; mut(): U32Mut; lShift(by: number): U32; rShift(by: number): U32; lRot(by: number): U32; rRot(by: number): U32; xor(o: U32): U32; or(o: U32): U32; and(o: U32): U32; not(): U32; add(o: U32): U32; sub(o: U32): U32; mul(o: U32): U32; eq(o: U32 | number): boolean; gt(o: U32 | number): boolean; gte(o: U32 | number): boolean; lt(o: U32 | number): boolean; lte(o: U32 | number): boolean; toBytesBE(): Uint8Array; toBytesLE(): Uint8Array; getByte(byteIdx?: number): number; toString(): string; get [Symbol.toStringTag](): string; [consoleDebugSymbol](): string; static get zero(): U32; } export declare class U32Mut extends U32 implements IUintMut<U32Mut, U32> { protected constructor(arr: Uint32Array, pos: number); set(v: U32 | number): this; zero(): this; static fromInt(uint32: number): U32Mut; static mount(src: Uint32Array, pos?: number): U32Mut; lShiftEq(by: number): this; lRotEq(by: number): this; rShiftEq(by: number): this; rRotEq(by: number): this; xorEq(o: U32 | number): this; orEq(o: U32 | number): this; andEq(o: U32 | number): this; notEq(): this; addEq(o: U32 | number): this; subEq(o: U32 | number): this; mulEq(o: U32 | number): this; } export {};