export interface Element {
    id: number;
    size: number;
    body: number;
    next: number;
}
/** An element that states no size. */
export interface OpenElement {
    id: number;
    body: number;
    open: true;
}
/** A view of part of the file, whose every coordinate is absolute. */
export interface Window {
    readonly at: number;
    readonly bytes: Uint8Array;
    readonly fileSize: number;
}
interface Vint {
    value: number;
    length: number;
}
type Unread = "unread";
/**
 * Thrown where a walk that stopped quietly
 * would turn a damaged list into a short one that looks whole.
 */
export declare class GrammarError extends Error {
}
export declare const DEFAULT_TIMESTAMP_SCALE = 1000000;
export declare const MAX_VINT_BYTES = 8;
/**
 * The element ids this reader knows.
 *
 * @see {@link https://www.matroska.org/technical/elements.html}
 */
export declare const ID: {
    readonly root: {
        readonly EBML: 440786851;
        readonly SEGMENT: 408125543;
    };
    readonly segment: {
        readonly SEEK_HEAD: 290298740;
        readonly INFO: 357149030;
        readonly TRACKS: 374648427;
        readonly TAGS: 307544935;
        readonly CUES: 475249515;
        readonly CLUSTER: 524531317;
        readonly CHAPTERS: 272869232;
        readonly ATTACHMENTS: 423732329;
    };
    readonly seek: {
        readonly ENTRY: 19899;
        readonly ID: 21419;
        readonly POSITION: 21420;
    };
    readonly info: {
        readonly TIMESTAMP_SCALE: 2807729;
        readonly TITLE: 31657;
        readonly MUXING_APP: 19840;
        readonly WRITING_APP: 22337;
        readonly DURATION: 17545;
    };
    readonly track: {
        readonly ENTRY: 174;
        readonly NUMBER: 215;
        readonly UID: 29637;
        readonly TYPE: 131;
        readonly CODEC_ID: 134;
        readonly CODEC_PRIVATE: 25506;
        readonly CODEC_DELAY: 22186;
        readonly LANGUAGE: 2274716;
        readonly LANGUAGE_IETF: 2274717;
        readonly NAME: 21358;
        readonly FLAG_DEFAULT: 136;
        readonly FLAG_FORCED: 21930;
        readonly FLAG_ENABLED: 185;
        readonly FLAG_HEARING_IMPAIRED: 21931;
        readonly FLAG_VISUAL_IMPAIRED: 21932;
        readonly FLAG_TEXT_DESCRIPTIONS: 21933;
        readonly FLAG_ORIGINAL: 21934;
        readonly FLAG_COMMENTARY: 21935;
        readonly CONTENT_ENCODINGS: 28032;
    };
    readonly contentEncoding: {
        readonly ENCODING: 25152;
        readonly ORDER: 20529;
        readonly SCOPE: 20530;
        readonly TYPE: 20531;
        readonly COMPRESSION: 20532;
        readonly COMP_ALGO: 16980;
        readonly COMP_SETTINGS: 16981;
    };
    readonly attachment: {
        readonly FILE: 24999;
        readonly FILE_NAME: 18030;
        readonly FILE_MIME: 18016;
        readonly FILE_DESCRIPTION: 18046;
        readonly FILE_DATA: 18012;
        readonly FILE_UID: 18094;
    };
    readonly tag: {
        readonly ENTRY: 29555;
        readonly TARGETS: 25536;
        readonly TRACK_UID: 25541;
        readonly SIMPLE: 26568;
        readonly NAME: 17827;
        readonly STRING: 17543;
    };
    readonly cue: {
        readonly POINT: 187;
        readonly TIME: 179;
        readonly TRACK_POSITIONS: 183;
        readonly TRACK: 247;
        readonly CLUSTER_POSITION: 241;
        readonly RELATIVE_POSITION: 240;
    };
    readonly cluster: {
        readonly TIMESTAMP: 231;
        readonly SIMPLE_BLOCK: 163;
        readonly BLOCK_GROUP: 160;
        readonly POSITION: 167;
        readonly PREV_SIZE: 171;
        readonly SILENT_TRACKS: 22612;
        readonly ENCRYPTED_BLOCK: 175;
    };
    readonly blockGroup: {
        readonly BLOCK: 161;
        readonly BLOCK_DURATION: 155;
    };
    readonly global: {
        readonly CRC32: 191;
        readonly VOID: 236;
    };
};
/** Decoded as a sized element. */
export declare const decoded: (el: Element | OpenElement | Unread) => el is Element;
/** Decoded as a sized element that ends within its parent. */
export declare const fits: (el: Element | OpenElement | Unread, end: number) => el is Element;
export declare const covers: (window: Window, at: number, length: number) => boolean;
export declare const reachOf: (window: Window) => number;
export declare const isGrammarError: (error: unknown) => boolean;
export declare const uintFits: (size: number) => boolean;
export declare function readVint(window: Window, at: number): Vint | Unread;
export declare function vintLength(lead: number): number;
/**
 * The value of a vint whose length is known.
 *
 * `id` keeps the marker bit so the value compares to the constants as is; `size` drops it.
 */
export declare function vintValue(bytes: Uint8Array, start: number, length: number, as: "id" | "size"): number;
export declare function uintValue(bytes: Uint8Array, start: number, size: number): number;
export declare function readElement(window: Window, at: number): Element | OpenElement | Unread;
export declare function children(window: Window, body: number, size: number): Generator<Element>;
export declare function readFloat(window: Window, el: Element): number | null;
export declare function readUint(window: Window, el: Element): number;
export declare function readUid(window: Window, el: Element): string | null;
export declare function readAscii(window: Window, el: Element): string;
export declare function readUtf8(window: Window, el: Element): string;
export declare function readBytes(window: Window, at: number, length: number): Uint8Array;
export {};
