THotPDF.CompressFlateHighRatio Method
创建符合标准的 zlib 流,并可选择用带预算的 Zopfli 优化进一步压缩
声明
function CompressFlateHighRatio(
const Input: TBytes;
out Output: TBytes;
out AInfo: THPDFZopfliFlateInfo): Boolean;
该方法先以最大压缩级别尝试默认、filtered、run-length 和仅 Huffman 这四种 zlib 策略,然后在 ZopfliFlateOptions 允许时再运行 Zopfli
Output 永远不会比最小的 zlib 基线更大,因为只有字节数严格减少时才会选用 Zopfli
The Boolean result reports whether a compatible output was produced; inspect AInfo.UsedZopfli to determine which encoder won