/** * Range Calculator Module * Handles HTTP Range header parsing and chunk offset calculations */ import type { ParsedRange, ChunkWithOffsets, ChunkManifest } from './types.js'; /** * Parses an HTTP Range header * @param rangeHeader - Range header value (e.g., "bytes=0-1023") * @param totalSize - Total size of the file * @returns Parsed range with start, end, and length */ export declare function parseRangeHeader(rangeHeader: string, totalSize: number): ParsedRange | null; /** * Determines which chunks are needed for a given byte range * @param manifest - Chunk manifest for the file * @param start - Start byte position * @param end - End byte position * @returns Array of chunks with calculated slice offsets */ export declare function getChunksForRange(manifest: ChunkManifest, start: number, end: number): ChunkWithOffsets[]; /** * Calculates total bytes that will be extracted from chunks * Useful for validating range responses */ export declare function calculateExtractedSize(chunks: ChunkWithOffsets[]): number; //# sourceMappingURL=RangeCalculator.d.ts.map