import type { Element, OpenElement, Window } from "../ebml.js";
import { type Source } from "../io/source.js";
export interface Segment {
    /**
     * The absolute offset of the Segment's first child.
     *
     * Every Seek and Cue position is relative to it.
     */
    body: number;
    end: number;
}
export interface SegmentPass {
    source: Source;
    segment: Segment;
    head: Window;
    signal: AbortSignal | undefined;
}
/** For a cluster, the window reaches its Timestamp. */
interface TopLevelHop {
    at: number;
    el: Element | OpenElement;
    window: Window;
}
export declare const ELEMENT_HEADER_BYTES: number;
/** Enough to read a cluster's header and its Timestamp. */
export declare const CLUSTER_PROBE_BYTES = 64;
export declare const pastSegment: (el: Element, segment: Segment) => boolean;
export declare const headerNeed: (at: number, end: number) => number;
export declare function readPastHead(pass: SegmentPass, at: number, length: number, held: Window): Promise<Window>;
export declare function hopTopLevel(pass: SegmentPass, 
/** A hop resumes past a sizeless cluster at the end the walk found. */
from?: number): AsyncGenerator<TopLevelHop>;
/** In a sizeless cluster the search goes as far as the window reaches. */
export declare function readClusterTicks(window: Window, cluster: Element | OpenElement): number | null;
export {};
