@vitaeflow/sdk-js
Version:
Official JavaScript/TypeScript SDK for VitaeFlow - Embed and extract structured resume data from PDFs
46 lines • 1.58 kB
TypeScript
/**
* Universal buffer utilities for browser and Node.js compatibility
* All functions work with Uint8Array as the universal binary data type
*/
/**
* Ensures input is converted to Uint8Array regardless of input type
*/
export declare function ensureUint8Array(input: Buffer | Uint8Array | ArrayBuffer): Uint8Array;
/**
* Convert ArrayBuffer to Uint8Array
*/
export declare function arrayBufferToUint8Array(buffer: ArrayBuffer): Uint8Array;
/**
* Convert string to Uint8Array using UTF-8 encoding
*/
export declare function textToBytes(text: string): Uint8Array;
/**
* Convert Uint8Array to string using UTF-8 decoding
*/
export declare function bytesToText(bytes: Uint8Array): string;
/**
* Convert Uint8Array to ASCII string (for PDF signatures)
* Only converts first 'length' bytes to avoid invalid UTF-8
*/
export declare function bytesToAscii(bytes: Uint8Array, length?: number): string;
/**
* Create a copy of Uint8Array to avoid shared buffer issues
*/
export declare function cloneUint8Array(source: Uint8Array): Uint8Array;
/**
* Concatenate multiple Uint8Arrays into one
*/
export declare function concatUint8Arrays(...arrays: Uint8Array[]): Uint8Array;
/**
* Check if two Uint8Arrays are equal
*/
export declare function areUint8ArraysEqual(a: Uint8Array, b: Uint8Array): boolean;
/**
* Convert Uint8Array to hex string for debugging
*/
export declare function uint8ArrayToHex(bytes: Uint8Array): string;
/**
* Convert hex string to Uint8Array
*/
export declare function hexToUint8Array(hex: string): Uint8Array;
//# sourceMappingURL=buffer.d.ts.map