import type { Fetcher } from './types'; export interface RangeFetchResult { /** Raw bytes returned for this range. */ bytes: ArrayBuffer; /** True if the server's response indicates more data exists past `endExclusive`. */ truncated: boolean; /** Total file size in bytes if the server reported it (Content-Range or Content-Length). */ totalSize: number | null; } /** * Fetch `[start, endExclusive)` bytes from `url` using a `Range` header. * * - If the server responds with `206 Partial Content`, parses Content-Range * to determine truncation. * - If the server returns the full body (`200 OK` — common for small files * or servers that ignore Range), uses Content-Length. * - On non-OK responses, throws `RangeFetchError` with the response status. */ export declare function rangeFetch(url: string, start: number, endExclusive: number, fetcher?: Fetcher, init?: RequestInit): Promise; /** * Fetch the LAST `n` bytes of a resource. Mirrors HTTP's negative-offset * Range syntax (`Range: bytes=-N`). Used by the mcap previewer to read the * footer without first knowing the file size. */ export declare function rangeFetchTail(url: string, n: number, fetcher?: Fetcher, init?: RequestInit): Promise; export declare class RangeFetchError extends Error { status: number; constructor(message: string, status: number); } //# sourceMappingURL=range-fetch.d.ts.map