/** * WebP Encoder - Instance-based encoder for efficient batch processing */ import { WebPEncodeOptions } from './types'; /** * WebP Encoder class * * Creates an encoder instance that can be reused for multiple images, * reducing initialization overhead. * * @example * ```typescript * const encoder = new WebPEncoder({ quality: 80, lossless: false }); * const webp1 = encoder.encode(jpegData1); * const webp2 = encoder.encode(pngData); * encoder.close(); * ``` */ export declare class WebPEncoder { private encoderPtr; private closed; /** * Create a new WebP encoder with the given options * @param options Partial WebP encoding options (merged with defaults) */ constructor(options?: Partial); /** * Encode image file data (JPEG, PNG, etc.) to WebP format * @param imageFileData Buffer containing image file data * @returns WebP encoded data as Buffer */ encode(imageFileData: Buffer): Buffer; /** * Close the encoder and free resources * Must be called when done using the encoder */ close(): void; /** * Get default WebP encoding options */ static getDefaultOptions(): WebPEncodeOptions; /** * Convert TypeScript options to C struct */ private convertOptions; } //# sourceMappingURL=webp-encoder.d.ts.map