import type { TypedArray, TypedArrayConstructor } from '../types.js'; /** * Create a new resizable buffer instance. * @param {TypedArrayConstructor} [arrayType] * The array type. * @returns {Buffer} The buffer. */ export declare function buffer(arrayType?: TypedArrayConstructor): Buffer; /** * Resizable byte buffer. */ export declare class Buffer { buf: BigInt64Array | BigUint64Array | Float32Array | Float64Array | Int16Array | Int32Array | Int8Array | Uint16Array | Uint32Array | Uint8Array; /** * Create a new resizable buffer instance. * @param {TypedArrayConstructor} arrayType */ constructor(arrayType?: TypedArrayConstructor); /** * Return the underlying data as a 64-bit aligned array of minimum size. * @param {number} size The desired minimum array size. * @returns {TypedArray} The 64-bit aligned array. */ array(size: number): TypedArray; /** * Prepare for writes to the given index, resizing as necessary. * @param {number} index The array index to prepare to write to. */ prep(index: number): void; /** * Return the value at the given index. * @param {number} index The array index. */ get(index: number): number | bigint; /** * Set a value at the given index. * @param {number | bigint} value The value to set. * @param {number} index The index to write to. */ set(value: number | bigint, index: number): void; /** * Write a byte array at the given index. The method should be called * only when the underlying buffer is of type Uint8Array. * @param {Uint8Array} bytes The byte array. * @param {number} index The starting index to write to. */ write(bytes: Uint8Array, index: number): void; } /** * Create a new resizable bitmap instance. * @returns {Bitmap} The bitmap buffer. */ export declare function bitmap(): Bitmap; /** * Resizable bitmap buffer. */ export declare class Bitmap extends Buffer { /** * Set a bit to true at the given bitmap index. * @param {number} index The index to write to. */ set(index: number): void; }