import { BufferReader } from './buffer-reader.js';
export interface SmartBufferConfig {
    pageSize?: number;
    maxLength?: number;
    houseKeepInterval?: number;
}
export declare class SmartBuffer extends BufferReader {
    static DEFAULT_PAGE_SIZE: number;
    static DEFAULT_MAX_SIZE: number;
    private readonly _houseKeepInterval;
    private _houseKeepTimer?;
    private _lastHouseKeep;
    private _stMaxPages;
    private _length;
    readonly pageSize: number;
    readonly maxSize: number;
    constructor(cfg?: SmartBufferConfig);
    get capacity(): number;
    get length(): number;
    start(): this;
    flush(): Buffer;
    growSize(len: number): this;
    fill(value?: number, len?: number): this;
    writeCString(str: string, encoding?: BufferEncoding): this;
    writeLString(str?: string, encoding?: BufferEncoding): this;
    writeString(str: string, encoding?: BufferEncoding): this;
    writeInt8(n: number): this;
    writeUInt8(n: number): this;
    writeUInt16BE(n: number): this;
    writeUInt32BE(n: number): this;
    writeInt16BE(n: number): this;
    writeInt32BE(n: number): this;
    writeBigInt64BE(n: bigint | number): this;
    writeFloatBE(n: number): this;
    writeDoubleBE(n: number): this;
    writeBuffer(buffer: Buffer): this;
    private _houseKeep;
}
