Impact of Fast Bytes on 7-Zip Compression Speed
The fast byte parameter in 7-Zip directly dictates how thoroughly the LZMA and LZMA2 algorithms search for matching sequences of data, creating a direct trade-off between processing time and final archive size. Increasing this value forces the compression engine to evaluate longer duplicate byte sequences, which increases CPU utilization and noticeably slows down compression speed. Conversely, reducing the fast bytes parameter accelerates compression significantly at the expense of a marginally larger output file.
What the Fast Bytes Parameter Does
In 7-Zip's primary algorithms (LZMA and LZMA2), data is compressed by
identifying and replacing repeated sequences of bytes with references to
earlier occurrences. The "Fast Bytes" (or fb in
command-line syntax) setting defines the maximum sequence length the
match finder evaluates before stopping the comparison.
The parameter accepts values ranging from 5 to 273:
- Default values: Typically set to 32 for "Normal" compression and 64 for "Maximum" compression.
- Maximum value: 273 bytes, which represents the longest possible match LZMA can encode in a single operation.
How Fast Bytes Dictates Compression Speed
Compression speed depends primarily on how many comparisons the match finder must execute per block of input data.
- Higher Values Reduce Speed Exponentially: Setting the fast bytes parameter to higher levels—such as 128 or 273—forces the processor to continue checking potential string matches long after finding a suitable match. This introduces substantial computational overhead. On multi-gigabyte datasets, moving from 32 to 273 fast bytes can double or triple the total compression time.
- Lower Values Maximize Throughput: Lowering the parameter to values between 16 and 32 drastically shortens the search loop. The compressor accepts shorter matches and moves on immediately, resulting in significantly higher gigabytes-per-hour processing throughput and lower sustained CPU strain.
- Diminishing Returns on File Size: While compression speed scales downward dramatically as fast bytes increase, the reduction in archive size follows a steep curve of diminishing returns. For most binary files, executables, and mixed media, raising the setting beyond 64 produces less than a 1% to 2% improvement in space savings while severely penalizing execution speed.
Optimizing the Setting
- Prioritize Speed (Fast Backups): Set fast bytes between 16 and 32. This configuration provides the bulk of LZMA's compression capabilities while processing data at near-maximum write speeds.
- Balanced General Use: Keep the setting at the default 32 to 64. This strikes an optimal balance between manageable compression times and file reduction.
- Prioritize Archival Size (Write-Once Archives): Use 128 to 273 only when file size is the sole priority, such as distributing software over limited bandwidth or compressing highly repetitive text and log files where ultra-long sequence matches are common.