/** * E57 (ASTM E2807-11) streaming source. * * Unlike a naive "read the whole file, then decode" approach — which * allocates the entire file (plus a CRC-stripped copy of it) in one * `ArrayBuffer` and dies with "Array buffer allocation failed" on * multi-GB scans — this source reads the binary CompressedVector * section incrementally: * * open(): read the 48-byte FileHeader + the (small) XML section, then * resolve every Data3D scan's binary data offset by reading * just its 32-byte CompressedVector section header. * next(): read a bounded LOGICAL window from the blob (page-CRC * stripped on the fly), walk the DataPackets inside it, * apply stride + per-scan pose, and emit a decoded chunk. * * Peak memory is therefore ~one window (≤ 16 MiB) plus one output chunk, * not the whole file. The per-packet decode primitives are shared with * the whole-file `decodeE57Scan` so both paths agree byte-for-byte. */ import type { DecodedPointChunk } from '../types.js'; import type { DownsampleHint, PointSourceInfo, StreamingPointSource } from './types.js'; export declare class E57StreamingSource implements StreamingPointSource { private bytes; private downsample; private label?; /** Test hook: force a fixed window size to exercise straddle/re-read. */ private windowBytesOverride?; private opened; private pageSize; private fileLogicalSize; private scans; private totalPointCount; private hasColor; private hasIntensity; private hasClassification; private scanIdx; private logCursor; /** Records consumed of the CURRENT scan (resets at each scan boundary). */ private recordsWritten; /** * Cumulative declared `recordCount` of every scan BEFORE the current one. * `scanRecordBase + recordsWritten` is the record's index in the merged * multi-scan cloud — the phase the stride must align to so downsampling * matches the whole-file decoder (which strides the merged cloud globally) * rather than restarting the stride phase inside each scan. */ private scanRecordBase; constructor(blob: Blob, options?: { label?: string; downsample?: DownsampleHint; windowBytes?: number; }); open(signal?: AbortSignal): Promise; next(maxPoints: number, signal?: AbortSignal): Promise; close(): void; /** * Resolve a scan's binary data offset by reading its 32-byte * CompressedVector section header (E57 §6.4.2). The XML's `fileOffset` * points at this section header, not the first DataPacket. */ private resolveDataOffset; /** Logical bytes to pull on the next read — bounded and EOF-clamped. */ private computeWindowLen; private toInfo; } //# sourceMappingURL=e57-source.d.ts.map