import type { StoredEntry } from "./types.js"; export interface ParsedBlob { header: StoredEntry; payload: Buffer | null; } /** * Detects whether a blob uses pure JSON format or binary format. * Pure JSON starts with '{' (0x7B), binary format starts with uint32 length. */ export declare function isPureJsonFormat(buffer: Buffer): boolean; /** * Parses a blob buffer into header and optional payload. * Automatically detects format based on first byte. * * @throws {SyntaxError} If JSON parsing fails * @throws {RangeError} If header length exceeds buffer size */ export declare function parseBlob(buffer: Buffer): ParsedBlob; /** * Creates a blob buffer from header and optional payload. * Uses pure JSON format when no payload, binary format otherwise. * * @throws {Error} If header exceeds MAX_HEADER_SIZE in binary format */ export declare function createBlob(header: StoredEntry, payload?: Buffer): Buffer; /** * Extracts just the header from a blob without fully parsing the payload. * Useful for metadata-only reads. */ export declare function parseHeader(buffer: Buffer): StoredEntry; /** * Checks if a blob has a payload (large value stored after header). */ export declare function hasPayload(header: StoredEntry): boolean; //# sourceMappingURL=blob-format.d.ts.map