import { BinaryStream } from '@quake2ts/shared'; export interface DemoMessageBlock { length: number; data: BinaryStream; } export declare class DemoReader { private buffer; private view; private offset; private messageOffsets; private currentBlock; constructor(buffer: ArrayBuffer); /** * Scans the buffer to build an index of message offsets. */ private scan; /** * Checks if there are more blocks to read. */ hasMore(): boolean; /** * Reads the next message block from the demo file. * Format is [Length (4 bytes)] + [Message Block (Length bytes)]. * Returns null if end of file or incomplete block. */ readNextBlock(): DemoMessageBlock | null; /** * Advances to the next block and stores it in `currentBlock`. * Returns true if a block was read, false otherwise. * Compatible with `getBlock()` usage. */ nextBlock(): boolean; /** * Returns the current block read by `nextBlock()`. */ getBlock(): DemoMessageBlock; /** * Reads all remaining blocks and concatenates them into a single buffer. * Useful for converting discrete blocks into a continuous stream. */ readAllBlocksToBuffer(): ArrayBuffer; /** * Resets the reader to the beginning. */ reset(): void; /** * Seeks to a specific message index. * Returns true if successful, false if index is out of bounds. */ seekToMessage(index: number): boolean; /** * Returns the total number of messages in the demo. */ getMessageCount(): number; getOffset(): number; getProgress(): { current: number; total: number; percent: number; }; } //# sourceMappingURL=demoReader.d.ts.map