/** * Compression Utilities for TOSS * * Implements safe, deterministic compression for metadata only. * Transaction bytes are NEVER compressed to preserve determinism. * * Production-ready with official APIs. */ /** * Simple DEFLATE-based compression using native zlib * (Available in Node.js and via polyfills in React Native) * * For metadata compression: memos, recipient names, etc. * NOT for transaction signatures or amounts! */ export interface CompressionResult { compressed: boolean; data: Uint8Array; originalSize: number; compressedSize: number; compressionRatio: number; } /** * Compress metadata safely * Only compresses if compression saves >10% and data >200 bytes * * Safe for: memo text, user names, descriptions * UNSAFE for: signatures, amounts, transaction data */ export declare function compressMetadata(data: string): Promise; /** * Decompress metadata */ export declare function decompressMetadata(data: Uint8Array): Promise; /** * Compress intent metadata for efficient transmission * Returns the original intent with compressed metadata */ export declare function compressIntentMetadata(intentMetadata: Record): Promise<{ original: Record; compressed: Record; savings: number; }>; /** * Decompress intent metadata */ export declare function decompressIntentMetadata(compressedMetadata: Record): Promise>; /** * Calculate size savings for a metadata object */ export declare function estimateCompressionSavings(metadata: Record): number; //# sourceMappingURL=compression.d.ts.map