import { KaitaiStream, StreamBufferType } from "./kaitai-stream";
export declare class KaitaiStreamWriter extends KaitaiStream {
    /**
      KaitaiStream is an implementation of Kaitai Struct API for JavaScript.
      Based on DataStream - https://github.com/kig/DataStream.js
      @param {ArrayBuffer} arrayBuffer ArrayBuffer to read from.
      @param {?Number} byteOffset Offset from arrayBuffer beginning for the KaitaiStream.
      */
    constructor(arrayBuffer?: StreamBufferType, byteOffset?: number, isBigEndian?: boolean);
    static create(size: number): KaitaiStreamWriter;
    readonly toBytes: Uint8Array;
    write(value: number | boolean, type: 'f' | 'u' | 's' | 'b', size: number): any;
    writeU(value: number, byteSize: number): this;
    writeF(value: any, byteSize: number): this;
    writeS(value: any, byteSize: number): this;
    pos: any;
    private _flushBitsLeftIfNeeded;
    private _flushBits;
    _setBit(value: boolean): this;
    writeB(v: number | boolean, n?: number): this;
    forwardBits(n: number): this;
    /**
     *
     * @param v true or false
     * @param n number of bits
     */
    writeBitsBoolean(v: boolean, n: number): this;
    writeBytes(data: Uint8Array, size?: number): this;
    private _checkSize;
    resize(newSize: number): void;
}
