export interface E57FileHeader { majorVersion: number; minorVersion: number; fileLogicalSize: number; xmlLogicalOffset: number; xmlLogicalLength: number; pageSize: number; } /** Read the 48-byte FileHeader. Throws on bad magic. */ export declare function parseE57FileHeader(bytes: Uint8Array): E57FileHeader; /** * Strip the 4-byte CRC tail from each `pageSize`-byte physical page. * * Returns a freshly-allocated buffer of "logical" bytes — the form that * XML offsets and CompressedVector data offsets reference. * * `pageSize` is read from the header and is conventionally 1024. */ export declare function stripPageCrc(bytes: Uint8Array, pageSize: number): Uint8Array; /** Convert a physical (CRC-paged) offset to the equivalent logical offset. */ export declare function physicalToLogical(physical: number, pageSize: number): number; /** * Convert a logical (CRC-stripped) offset back to its physical (on-disk) * offset — the inverse of `physicalToLogical`. Needed by the streaming * reader to translate XML / section offsets into the byte ranges it must * `Blob.slice()` from disk. */ export declare function logicalToPhysical(logical: number, pageSize: number): number; /** * Read a CompressedVector binary-section header (E57 spec §6.4.2) and * return the LOGICAL byte offset where its DataPackets actually start. * * Layout (32 bytes): * [ 0] u8 sectionId (must == 1 for CompressedVector) * [ 1] u8[7] reserved * [ 8] u64 LE sectionLogicalLength * [16] u64 LE dataPhysicalOffset * [24] u64 LE indexPhysicalOffset * * The XML's `points@fileOffset` points at this section header — NOT at * the first DataPacket. Reading packets straight at `fileOffset` puts * the parser ~32 bytes off and the first u16 it reads is the low half * of `sectionLogicalLength`, which usually decodes as a bytestreamCount * of 0 (matched the user-reported `bytestreamCount (0) ≠ prototype * length (7)` error exactly). */ export declare function resolveCompressedVectorDataOffset(logical: Uint8Array, physicalSectionOffset: number, pageSize: number): number; export declare function readU64LE(view: DataView, offset: number): number; //# sourceMappingURL=e57-page.d.ts.map