b2KIT

Compression Benchmark Tool

Compare gzip, brotli, and deflate compression ratios and speed on your data side by side.

Tested tool guide Tested browser tools Checked August 16, 2026

What Compression Benchmark Tool does and how it behaves

Compression Benchmark Tool tests one input with gzip, Brotli, and deflate, then places their compression ratios and speed results side by side. This makes it useful for comparing codecs on the exact text or data you expect to serve, rather than relying on general claims about typical performance. The benchmark runs in the browser, so the entered material is not uploaded. A common surprise is that short or already-compressed input may shrink very little or even become larger because compressed formats have framing and metadata overhead.

How the result is produced

1

Three formats, one input

The tool applies gzip, Brotli, and deflate to the same input so their results can be compared within one run. Gzip is not a wholly separate compression method from DEFLATE: it packages DEFLATE-compressed data with gzip framing. Brotli is a separately specified compressed-data format. These format differences can affect the final size, especially for small inputs.

2

Ratio and timing

For each format, the benchmark relates the compressed size to the original size and records the displayed speed measurement. Read the ratio label carefully because compression results may be expressed as a remaining-size ratio, an original-to-compressed ratio, or percentage savings. Timing reflects the current browser, device, input, and encoder settings, so comparisons from different environments are not directly equivalent.

Good uses

  • Compare codecs before choosing an HTTP content encoding for a text-heavy response.
  • Check whether repeated JSON, CSS, HTML, or log data benefits more from Brotli, gzip, or deflate.
  • Measure how a small payload changes when compression framing overhead is included.

Limits and checks

  • Do not generalize from one sample: compressibility depends heavily on repetition, structure, character distribution, and input length.
  • A faster result in one browser run does not establish server-side throughput; hardware, runtime load, compression level, and encoder implementation can change timing.
  • The term deflate can refer to a raw DEFLATE stream or to DEFLATE data with zlib framing. Do not assume the displayed result is byte-for-byte interchangeable with every system labeled deflate.

Common questions

Does the smallest result identify the best format for my website?

No. It identifies the smallest result for the tested input under the benchmark's current conditions. A deployment decision can also depend on browser or client support, server CPU cost, decompression behavior, cache strategy, and compression level. Test representative payloads, including both small and large responses, rather than selecting a format from one sample.

Why can gzip and deflate produce different sizes if gzip uses DEFLATE?

Gzip adds its own header and trailer around DEFLATE-compressed data, including integrity and size information. A deflate-labeled result may use different framing, so its overhead can differ even when the compressed payload is similar. Encoder settings can also produce different DEFLATE streams from identical input, so equal source data does not require equal output size.

References and verification

The behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools