UNPKG

@julesl23/s5js

Version:

Enhanced TypeScript SDK for S5 decentralized storage with path-based API, media processing, and directory utilities

114 lines 2.63 kB
import type { ImageMetadata, InitializeOptions, WASMModule as IWASMModule } from '../types.js'; /** * WebAssembly module wrapper for image processing */ export declare class WASMModule implements IWASMModule { private wasmInstance?; private memory?; private allocatedBuffers; /** * Initialize a new WASM module instance */ static initialize(options?: InitializeOptions): Promise<IWASMModule>; /** * Load the WASM binary and initialize */ private loadWASM; /** * Initialize the WASM module */ initialize(): Promise<void>; /** * Create a fallback implementation */ private createFallback; /** * Extract metadata using WASM */ extractMetadata(data: Uint8Array): ImageMetadata | undefined; /** * Fallback metadata extraction when WASM is not available */ private fallbackExtractMetadata; /** * Extract additional metadata that WASM doesn't provide */ private extractAdditionalMetadata; /** * Detect image format from magic bytes */ private detectFormatFromBytes; /** * Allocate memory in WASM */ private allocate; /** * Write data to WASM memory */ private writeMemory; /** * Free allocated memory */ private free; /** * Classify processing speed based on time */ private classifyProcessingSpeed; /** * Clean up allocated memory */ cleanup(): void; /** * Get count of allocated buffers (for testing) */ getAllocatedBufferCount(): number; /** * Read string from WASM memory */ private readString; /** * Read metadata structure from WASM memory */ private readMetadata; /** * Convert format to MIME type */ private formatToMimeType; /** * Extract JPEG-specific metadata */ private extractJPEGMetadata; /** * Extract PNG-specific metadata */ private extractPNGMetadata; /** * Extract WebP-specific metadata */ private extractWebPMetadata; /** * Check if JPEG is progressive */ private isProgressiveJPEG; /** * Extract EXIF data from image */ private extractEXIF; /** * Estimate JPEG quality */ private estimateJPEGQuality; /** * Extract histogram data */ private extractHistogram; /** * Analyze exposure from histogram */ private analyzeExposure; /** * Detect color space from image data */ private detectColorSpace; } //# sourceMappingURL=module.d.ts.map