export type SDBMAcceptDataType = string | Uint8Array; export type SDBMBitsSize = 32 | 64; export type SDBMInterpretMode = "bytes" | "unicode-code-points" | "utf16-code-units"; export interface SDBMOptions { /** * Data interpret mode of the SDBM. * * - **`bytes`:** UTF-8 encoded bytes. * - **`unicode-code-points`:**: Unicode code points. * - **`utf16-code-units`:** UTF-16 code units; Used in the previous versions. * @default {"byte"} */ interpret?: SDBMInterpretMode; /** * Bits size of the SDBM. * @default {32} */ size?: SDBMBitsSize; } /** * Get the non-cryptographic hash of the data with algorithm SDBM. */ export declare class SDBM { #private; get [Symbol.toStringTag](): string; /** * Initialize. * @param {SDBMOptions} [options={}] Options. */ constructor(options?: SDBMOptions); /** * Whether the instance is freezed. * @returns {boolean} */ get freezed(): boolean; /** * Clone the instance. * @returns {SDBM} */ clone(): SDBM; /** * Freeze the instance to prevent any further update. * @returns {this} */ freeze(): this; /** * Get the non-cryptographic hash of the data, in Uint8Array. * @returns {Uint8Array} */ hash(): Uint8Array; /** * Get the non-cryptographic hash of the data, in hexadecimal with padding. * @returns {string} */ hashHex(): string; /** * Append data. * @param {SDBMAcceptDataType} data Data. * @returns {this} */ update(data: SDBMAcceptDataType): this; /** * Append data from the readable stream. * @param {ReadableStream} stream Data from the readable stream. * @returns {Promise} */ updateFromStream(stream: ReadableStream): Promise; } export default SDBM;