ppu-paddle-ocr
Version:
Lightweight, probably the fastest PaddleOCR SDK in TypeScript. Runs anywhere JavaScript runs: Node.js, Bun, Deno, mobile react-native, web browsers, and browser extensions. Docker & CLI supported. The official SDK is browser-only. Accurate text detection
26 lines (25 loc) • 570 B
TypeScript
/**
* Simple LRU cache for processed images to avoid redundant processing
*/
export declare class ImageCache {
private cache;
private maxSize;
constructor(maxSize?: number);
/**
* Get item from cache
*/
get(key: string): unknown;
/**
* Set item in cache
*/
set(key: string, value: unknown): void;
/**
* Clear cache
*/
clear(): void;
/**
* Generate cache key from image data
*/
static generateKey(imageBuffer: ArrayBuffer): string;
}
export declare const globalImageCache: ImageCache;