import { Buffer } from './buffer'; declare function binaryify(o: any): Buffer; declare function parse(buf: Uint8Array): any; /** * @default */ declare const _default: { /** * @method binaryify(obj):Buffer * Convert a JSON object to binary format. * @param obj:any - The object to convert. * @return {Buffer} - The binary representation of the object. * @example * ```ts * const jsonb = require('quark/jsonb'); * const binaryData = jsonb.binaryify({ key: 'value' }); * console.log(binaryData); // Outputs the binary data. * ``` * @throws {Error} - If the object cannot be serialized. */ binaryify: typeof binaryify; /** * @method parse(buf):any * Parse a binary buffer back to a JSON object. * @param buf:Uint8Array - The binary data to parse. * @return {any} - The parsed JSON object. * @example * ```ts * const jsonb = require('quark/jsonb'); * const jsonData = jsonb.parse(binaryData); * console.log(jsonData); // Outputs the original JSON object. * ``` * @throws {Error} - If the buffer cannot be parsed. */ parse: typeof parse; }; export default _default;