@yogesh0333/yogiway
Version:
YOGIWAY Format - Ultra-compact, nested-aware data format for LLM prompts. Handles deeply nested JSON efficiently, 10-15% more efficient than TOON.
54 lines • 1.98 kB
TypeScript
/**
* PATHX - Path-Optimized Binary Exchange Format
* Binary format optimized for deep nesting with path caching
* FREE AND OPEN SOURCE - No license required
*/
export interface PathxEncodeOptions {
/** Compress output with zlib (default: false) */
compress?: boolean;
/** Optimize paths with caching (default: true) */
optimizePaths?: boolean;
/** Maximum recursion depth (default: 1000) */
maxDepth?: number;
/** Enable checksum for data integrity (default: false) */
checksum?: boolean;
/** Enable typed arrays for better performance (default: true) */
typedArrays?: boolean;
/** Streaming chunk size for large data (default: 8192) */
streamingChunkSize?: number;
/** Enable streaming mode for large datasets (default: false) */
streaming?: boolean;
}
export interface PathxDecodeOptions {
/** Maximum recursion depth (default: 1000) */
maxDepth?: number;
/** Enable partial decoding for corrupted data (default: false) */
partialDecode?: boolean;
/** Verify checksum if present (default: true) */
verifyChecksum?: boolean;
}
/**
* Encode data to PATHX binary format
*/
export declare function pathxEncode(data: any, options?: PathxEncodeOptions): Uint8Array;
/**
* Decode PATHX binary format to JavaScript object
*/
export declare function pathxDecode(data: Uint8Array, options?: PathxDecodeOptions): any;
/**
* Convert PATHX binary data to human-readable debug format
* This does NOT impact performance of normal encode/decode operations
*/
export declare function pathxToDebugString(data: Uint8Array, options?: PathxDecodeOptions): string;
/**
* Validate PATHX data integrity
*/
export declare function validatePathx(data: Uint8Array): boolean;
declare const _default: {
encode: typeof pathxEncode;
decode: typeof pathxDecode;
toDebugString: typeof pathxToDebugString;
validate: typeof validatePathx;
};
export default _default;
//# sourceMappingURL=pathx.d.ts.map