import { KaitaiStreamWriter } from './kaitai/kaitai-stream-writer';
export declare namespace TLV {
    interface TlvNode {
        header: Header;
        children?: Array<TlvNode>;
        payload?: Uint8Array;
    }
    interface Schema {
        validate: any;
        resources: {
            [key: string]: Resource;
        };
        id: {
            [key: string]: any;
        };
    }
    enum DataType {
        String = "String",
        Integer = "Integer",
        Float = "Float",
        Boolean = "Boolean",
        Opaque = "Opaque",
        Time = "Time",
        Array = "Array"
    }
    interface Resource {
        id: string;
        type: DataType | Array<any>;
    }
    interface Header {
        id: number;
        len: number;
        type: IdentifierType;
    }
    enum IdentifierType {
        OBJECT_INSTANCE = 0,
        RESOURCE_INSTANCE = 1,
        MULTIPLE_RESOURCE = 2,
        RESOURCE_VALUE = 3
    }
    function tlvType(type: number, id: number, len: number): number;
    class Parser {
        private buffer;
        position: number;
        schema?: Schema;
        constructor(schema?: Schema);
        /**
         *
         * @param buf
         * @param offset
         * @param tlv
         */
        readHeader(): Header;
        readNextRecord(): TlvNode;
        append(header: Header, type: DataType): any;
        readAllRecords(endPosition: number): TlvNode[];
        parse(data: Uint8Array): TlvNode;
        private debug;
    }
    class Serializer {
        serialize(obj: TLV.TlvNode, stream?: KaitaiStreamWriter): Uint8Array;
        private writeHeader;
        serializeObj(obj: Record<string, any>, schema?: Schema): Uint8Array;
    }
}
