gnablib
Version:
A lean, zero dependency library to provide a useful base for your project.
54 lines (53 loc) • 1.85 kB
TypeScript
/*! Copyright 2024-2025 the gnablib contributors MPL-1.1 */
import { IUint, IUintMut } from '../interfaces/IUint.js';
import { AInt } from './_AInt.js';
import { U64 } from './U64.js';
export declare class U128 extends AInt implements IUint<U128> {
protected constructor(arr: Uint32Array, pos: number, name?: string);
static fromInt(i52: number): U128;
static fromI32s(...ns: number[]): U128;
static fromBytesBE(src: Uint8Array, pos?: number): U128;
static fromBytesLE(src: Uint8Array, pos?: number): U128;
static mount(arr: Uint32Array, pos?: number): U128;
clone(): U128;
mut(): U128Mut;
lShift(by: number): U128;
rShift(by: number): U128;
lRot(by: number): U128;
rRot(by: number): U128;
xor(o: U128): U128;
or(o: U128): U128;
and(o: U128): U128;
not(): U128;
add(o: U128): U128;
sub(o: U128): U128;
mul(o: U128): U128;
eq(o: U128): boolean;
gt(o: U128): boolean;
gte(o: U128): boolean;
lt(o: U128): boolean;
lte(o: U128): boolean;
static get zero(): U128;
}
export declare class U128Mut extends U128 implements IUintMut<U128Mut, U128> {
protected constructor(arr: Uint32Array, pos: number);
set(v: U128): U128Mut;
zero(): U128Mut;
u64at(idx?: number): U64;
static fromInt(i52: number): U128Mut;
static fromI32s(...ns: number[]): U128Mut;
static fromBytesBE(src: Uint8Array, pos?: number): U128Mut;
static fromBytesLE(src: Uint8Array, pos?: number): U128Mut;
static mount(arr: Uint32Array, pos?: number): U128Mut;
lShiftEq(by: number): this;
lRotEq(by: number): this;
rShiftEq(by: number): this;
rRotEq(by: number): this;
xorEq(o: U128): this;
orEq(o: U128): this;
andEq(o: U128): this;
notEq(): this;
addEq(o: U128): this;
subEq(o: U128): this;
mulEq(o: U128): this;
}