import type { Enum } from '../../../shared/src/enum.ts'; import type { Read } from '../dag/store.ts'; import * as FormatVersion from '../format-version-enum.ts'; import type { FrozenJSONValue } from '../frozen-json.ts'; import { type Hash } from '../hash.ts'; import { DataNodeImpl, type Entry, type InternalDiff, type InternalDiffOperation, InternalNodeImpl } from './node.ts'; type FormatVersion = Enum; /** * The size of the header of a node. (If we had compile time * constants we would have used that). * * There is a test ensuring this is correct. */ export declare const NODE_HEADER_SIZE = 11; export declare class BTreeRead implements AsyncIterable> { #private; protected readonly _cache: Map; protected readonly _dagRead: Read; protected readonly _formatVersion: FormatVersion; rootHash: Hash; readonly getEntrySize: (k: K, v: V) => number; readonly chunkHeaderSize: number; constructor(dagRead: Read, formatVersion: FormatVersion, root?: Hash, getEntrySize?: (k: K, v: V) => number, chunkHeaderSize?: number); getNode(hash: Hash): Promise; get(key: string): Promise; has(key: string): Promise; isEmpty(): Promise; scan(fromKey: string): AsyncIterableIterator>; /** * Collect ALL entries matching a prefix into an array in a single pass. * ~10x faster than scan() for large datasets because it avoids the * per-entry async generator overhead (13870 microtask hops → ~1 second). * Instead, reads all leaf nodes and collects entries synchronously. */ scanAll(fromKey: string): Promise>>; keys(): AsyncIterableIterator; entries(): AsyncIterableIterator>; [Symbol.asyncIterator](): AsyncIterableIterator>; diff(last: BTreeRead): AsyncIterableIterator; } export declare function allEntriesAsDiff(map: BTreeRead, op: 'add' | 'del'): Promise; export {}; //# sourceMappingURL=read.d.ts.map