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.
It would be great to add a
zstd_target_compressed_block_sizeconfiguration to controlZSTD_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_targetCBlockSizeparameter 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.