import { ExtRegistry } from "../lib/ext-registry";
import { QDecoderOption } from "./decoder-option";
export declare class QAsyncDecoder {
    static create(): QAsyncDecoder;
    write(chunk: Uint8Array): void;
}
/**
 * Quick Decoder class
 * @class
 * @classdesc Decoder class
 * @since 1.0.0
 */
export declare class QDecoder {
    __decoder: import("util").TextDecoder;
    __buffer: Uint8Array;
    __bufferOffset: number;
    __view: DataView;
    __extRegistry: ExtRegistry;
    static create(option?: QDecoderOption): QDecoder;
    /**
     * Change the extension handler for the decoder
     * @param handler The new extension handler
     * @since 1.0.0
     */
    changeRegistry(handler: ExtRegistry): void;
    setBuffer(buffer: Uint8Array): void;
    /**
     * Decode a buffer to a object
     * @param data The buffer to decode
     * @returns {T} The decoded object
     * @since 1.0.0
     */
    decode<T>(data: Uint8Array): T | undefined;
    /**
     * read a object from a buffer inside extension's decoder function.
     * @param data The buffer to decode
     * @returns {T} The decoded object
     * @since 1.0.0
     */
    read<T>(): T;
    isEnd(): boolean;
}
