Metoda THotPDF.OptimizeLoadedImagesParallel
Recompresses independent loaded image streams with bounded workers and deterministic source-order commits
Declaration
function OptimizeLoadedImagesParallel(WorkerCount: Integer; MinimumSavingsBytes: Int64; HighRatio: boolean; out AInfo: THPDFLoadedImageOptimizationInfo): Integer;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
WorkerCount | Maximum concurrent compression workers, clamped to 64 |
MinimumSavingsBytes | Minimum encoded-byte reduction required before an image stream is replaced |
HighRatio | When True, tries four deterministic maximum-compression strategies per image |
AInfo | Receives job, byte, failure, worker-limit, and deterministic-order statistics |
Return value
Returns the number of image streams replaced by smaller deterministic Flate payloads
Usage notes
- Munca de decodare folosește fluxuri adaptive limitate, iar memoria de compresie este proporțională cu WorkerCount
- Mutarea obiectelor PDF are loc doar pe firul apelantului după ce worker-ii se finalizează
- Rezultatele sunt comise în ordinea originală a obiectelor de imagine și doar când MinimumSavingsBytes este atins