/** * @file Byte/string conversion helpers shared by every {@link TinyFSCore} backend. */ /** * Converts a byte array into a base64 string. * * @param {Uint8Array} bytes Source bytes. * @returns {string} The base64 representation. */ export declare const bytesToBase64: (bytes: Uint8Array) => string; /** * Converts a base64 string into a byte array. * * @param {string} value Source string. * @returns {Uint8Array} The decoded bytes. */ export declare const base64ToBytes: (value: string) => Uint8Array; /** * Converts a byte array into a lowercase hexadecimal string. * * @param {Uint8Array} bytes Source bytes. * @returns {string} The hexadecimal representation. */ export declare const bytesToHex: (bytes: Uint8Array) => string; /** * Converts a hexadecimal string into a byte array. * * @param {string} value Source string. * @returns {Uint8Array} The decoded bytes. * @throws {TypeError} When the string length is odd. */ export declare const hexToBytes: (value: string) => Uint8Array; /** * Decodes a byte array using the requested encoding. * * @param {Uint8Array} bytes Source bytes. * @param {string | null} encoding Target encoding, or `null` for binary. * @returns {string | Uint8Array} The decoded payload. */ export declare const decodeBytes: (bytes: Uint8Array, encoding: string | null) => string | Uint8Array; /** * Converts supported input values into a byte array. * * @param {string | Uint8Array | ArrayBuffer | ArrayBufferView} data Source payload. * @param {string | null} encoding Encoding used when `data` is a string. * @returns {Uint8Array} The encoded bytes. * @throws {TypeError} When the payload type is not supported. */ export declare const toUint8Array: (data: string | Uint8Array | ArrayBuffer | ArrayBufferView, encoding: string | null) => Uint8Array; //# sourceMappingURL=encoding.d.mts.map