Skip to content

Feature request: target compressed block size #38

Description

@subzey

It would be great to add a zstd_target_compressed_block_size configuration to control ZSTD_c_targetCBlockSize.


ztsd compresses data in blocks. Any of those blocks can only be decompressed if downloaded entirely. With the default settings, the size of the blocks could be anything <= 128 kB.

Having a block size too large may be bad for incremental parsing of the response. For example, <link rel="stylesheet"> placed inside <head> may not be decompressed at the very start of the response if the block size happen to be larger than CWND × TCP/UDP packet size.

In order to mitigate the issue, the ZSTD_c_targetCBlockSize parameter was added recently:

https://github.com/facebook/zstd/blob/v1.5.6/lib/zstd.h#L394

so that the size of the blocks can be limited. It would be just great to be able to configure that in this nginx module.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions