declare const BType: { readonly null: 0; readonly uint: 1; readonly int: 2; readonly bigint: 3; readonly bool: 4; readonly str: 5; readonly list: 6; readonly map: 7; }; declare type BType = typeof BType[keyof typeof BType]; declare type BasicType = typeof BType.uint | typeof BType.int | typeof BType.bigint | typeof BType.bool | typeof BType.str; export declare type BSchema = [typeof BType.list, BSchema] | [typeof BType.list, BSchema, number] | [BasicType] | [BasicType, number] | { [x: string]: BSchema; }; export declare const buint: (bitSize?: number) => BSchema; export declare const bint: (bitSize?: number) => BSchema; export declare const bbool: () => BSchema; export declare const bstr: (lengthBitSize?: number) => BSchema; export declare const bbigint: (lengthBitSize?: number) => BSchema; export declare const blist: (elementType: BSchema, lengthBitSize?: number) => BSchema; export declare class BufferWriter { private arr; private offset; private reminder; constructor(initialSize?: number); reset(size?: number): void; expand(neededSize: number): void; private getNumByteSize; private getBigIntByteSize; private writePartial; writeUint(n: number, bitSize?: number): void; writeInt(n: number, bitSize?: number): void; writeBoolean(n: boolean): void; writeString(n: string, lengthBitSize?: number): void; writeBigInt(n: bigint, lengthBitSize?: number): void; writeUintAuto(n: number): void; writeIntAuto(n: number): void; writeStringAuto(n: string): void; writeListAuto(n: unknown[]): void; writeMapAuto(n: Record | Record): void; writeBigIntAuto(n: bigint): void; write(n: unknown): void; writeWithSchema(n: unknown, schema: BSchema): void; getBuffer(): ArrayBuffer; } export declare class BufferReader { private arr; private offset; private reminder; constructor(buffer?: ArrayBuffer); reset(buffer: ArrayBuffer): void; private readPartial; read(nullValue?: null | undefined): string | number | bigint | boolean | unknown[] | Record; readWithSchema(schema: BSchema, nullValue?: null | undefined): string | number | bigint | boolean | unknown[] | Record; readUint(bitSize?: number): number; readInt(bitSize?: number): number; readBoolean(): boolean; readString(lengthBitSize?: number): string; readBigInt(lengthBitSize?: number): bigint; readUintAuto(): number; readIntAuto(): number; readStringAuto(): string; readListAuto(): unknown[]; readMapAuto(): Record; readBigIntAuto(): bigint; } export declare function createBufferWriter(initialSize?: number): BufferWriter; export declare function createBufferReader(buffer?: ArrayBuffer): BufferReader; export {};