Skip to content

Zstd checksum should be configurable #7585

@ottenhoff

Description

@ottenhoff

Issue Details

In klauspost/compress, the encoder default is crc: true

In facebook/zstd, ZSTD_c_checksumFlag has default 0. (https://facebook.github.io/zstd/zstd_manual.html). This is the reference standard and used in other load balancers (e.g., the nginx-zstd extensions).

Brotli does not use a checksum.

It's a small speedup, 1-4% in my testing.

I would argue that the zstd checksum is providing little value on a high-throughput (normal) web server:

  1. TCP already detects random transmission errors.
  2. TLS already provides strong integrity protection against tampering.
  3. If the zstd compressed data is corrupted, what is the browser going to do? I assume the user is just going to retry the request!

Assistance Disclosure

AI not used

If AI was used, describe the extent to which it was used.

No AI used in my Github browsing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions