sonic-forest
Version:
High-performance (binary) tree and sorted map implementation (AVL, Splay, Radix, Red-Black)
15 lines (14 loc) • 497 B
TypeScript
export declare class Slice {
readonly data: Uint8Array;
readonly start: number;
readonly length: number;
constructor(data: Uint8Array, start: number, length: number);
at(index: number): number;
substring(start: number, length?: number): Slice;
equals(other: Slice): boolean;
compare(other: Slice): number;
toUint8Array(): Uint8Array;
toString(): string;
getCommonPrefixLength(other: Slice): number;
static fromUint8Array(data: Uint8Array): Slice;
}