/** Functions for dealing with `Range` headers in requests. * * @module */ import * as dntShim from "./_dnt.shims.js"; import type { FileInfo } from "./etag.js"; /** A representation of range of bytes. */ export interface ByteRange { start: number; end: number; } /** Determine, by the value of an `If-Range` header, if a `Range` header should * be applied to a request, returning `true` if it should or otherwise * `false`. */ export declare function ifRange(value: string, mtime: number, entity: Uint8Array | FileInfo): Promise; /** Given a range header value and a current byte size of an asset, determine * what ranges of bytes are being requested. */ export declare function parseRange(value: string, size: number): ByteRange[]; /** A class that takes a file (either a Deno.FsFile or Uint8Array) and bytes * and streams the ranges as a multi-part encoded HTTP body. * * This is specifically used by the `.send()` functionality to fulfill range * requests it receives, and could be used by others when trying to deal with * range requests, but is generally a low level API that most users of oak * would not need to worry about. */ export declare class MultiPartStream extends ReadableStream { #private; constructor(file: (dntShim.Deno.Reader & dntShim.Deno.Seeker & dntShim.Deno.Closer) | Uint8Array, type: string, ranges: ByteRange[], size: number, boundary: string); /** The content length of the entire streamed body. */ contentLength(): number; }