import { TapStreamReader, TapStreamWriter } from '@iotize/tap/client/impl';
import { DBIOTConverterInterface } from '../compressor-interface';
import { ExtractTypeFromMapping, ObjectMapping } from './definitions';
export declare function writeFieldLength(stream: TapStreamWriter, length: number): void;
export declare function readFieldLength(stream: TapStreamReader): number;
export declare class TLVMappedJsonObjectCompressor<T extends ObjectMapping> implements DBIOTConverterInterface<ExtractTypeFromMapping<T>> {
    private readonly mapping;
    strictMode: boolean;
    constructor(mapping: T);
    encode(input: ExtractTypeFromMapping<T>, stream?: TapStreamWriter): Uint8Array;
    decode(streamOrBuffer: TapStreamReader | Uint8Array): ExtractTypeFromMapping<T>;
}
export declare class TLVMappedJsonArrayCompressor<T> implements DBIOTConverterInterface<T[]> {
    private readonly options;
    constructor(options: {
        itemConverter: DBIOTConverterInterface<T>;
    });
    encode(input: T[], stream?: TapStreamWriter): Uint8Array;
    decode(streamOrBuffer: TapStreamReader | Uint8Array): T[];
}
/**
 * Optimization for an array of object,
 * It will not duplicate object/field information for each items
 */
export declare class TLVMappedJsonArrayOfObjectCompressor<T extends ObjectMapping> implements DBIOTConverterInterface<T[]> {
    private readonly options;
    constructor(options: {
        fields: {
            fieldName: string;
            converter: DBIOTConverterInterface<any>;
        }[];
    });
    encode(input: T[], stream?: TapStreamWriter): Uint8Array;
    decode(streamOrBuffer: TapStreamReader | Uint8Array): T[];
}
