import { Byte, Milliseconds } from '@vkontakte/videoplayer-shared';
export declare enum Tag {
    EBML = 440786851,
    EBMLVersion = 17030,
    EBMLReadVersion = 17143,
    EBMLMaxIDLength = 17138,
    EBMLMaxSizeLength = 17139,
    DocType = 17026,
    DocTypeVersion = 17031,
    DocTypeReadVersion = 17029,
    Void = 236,
    Segment = 408125543,
    SeekHead = 290298740,
    Seek = 19899,
    SeekID = 21419,
    SeekPosition = 21420,
    Info = 357149030,
    TimestampScale = 2807729,
    Duration = 17545,
    Tracks = 374648427,
    TrackEntry = 174,
    Video = 224,
    Projection = 30320,
    ProjectionType = 30321,
    ProjectionPrivate = 30322,
    Chapters = 272869232,
    Cluster = 524531317,
    Timestamp = 231,
    SilentTracks = 22612,
    SilentTrackNumber = 22743,
    Position = 167,
    PrevSize = 171,
    SimpleBlock = 163,
    BlockGroup = 160,
    EncryptedBlock = 175,
    Attachments = 423732329,
    Tags = 307544935,
    Cues = 475249515,
    CuePoint = 187,
    CueTime = 179,
    CueTrackPositions = 183,
    CueTrack = 247,
    CueClusterPosition = 241,
    CueRelativePosition = 240,
    CueDuration = 178,
    CueBlockNumber = 21368,
    CueCodecState = 234,
    CueReference = 219,
    CueRefTime = 150
}
export type UnknownTag = string;
export declare enum Type {
    SignedInteger = "int",// Big-endian, any size from 1 to 8 octets
    UnsignedInteger = "uint",// Big-endian, any size from 1 to 8 octets
    Float = "float",// Big-endian, defined for 4 and 8 octets (32, 64 bits)
    String = "string",// Printable ASCII (0x20 to 0x7E), zero-padded when needed
    UTF8 = "utf8",// Unicode string, zero padded when needed (RFC 2279)
    Date = "date",// signed 8 octets integer in nanoseconds with 0 indicating the precise beginning of the millennium (at 2001-01-01T00:00:00,000000000 UTC)
    Master = "master",// contains other EBML sub-elements of the next lower level
    Binary = "binary"
}
type TagValue<ExactType extends Type> = ExactType extends Type.SignedInteger ? number : ExactType extends Type.UnsignedInteger ? number : ExactType extends Type.Float ? number : ExactType extends Type.String ? string : ExactType extends Type.UTF8 ? string : ExactType extends Type.Date ? Milliseconds : ExactType extends Type.Master ? DataView : ExactType extends Type.Binary ? DataView : never;
export type ParsedTag = {
    tag: Tag | UnknownTag;
    type: Type;
    tagHeaderSize: Byte;
    tagSize: Byte;
    value: DataView;
    valueSize: Byte;
};
export declare const parseTag: (view: DataView) => ParsedTag;
export declare const parseUint: (view: DataView, size?: Byte) => number;
export declare const parseValue: <T extends Type>(view: DataView, type: T) => TagValue<T>;
export declare const parseRecursively: (view: DataView, onTag: (tag: ParsedTag) => boolean) => void;
export declare const validateHeader: (view: DataView) => boolean;
export {};
