zstd icon indicating copy to clipboard operation
zstd copied to clipboard

Add Controls to Constrain Window Size to Protocol Limits

Open felixhandte opened this issue 11 months ago • 1 comments

This PR adds convenience options that ensure Zstd produces compressed outputs compatible with protocols that place limits on the window size. Currently, it supports two protocols:

This option is exposed as a new CCtx param ZSTD_c_constrainWindowForProtocol and a corresponding CLI argument --constrain-window.

To-Do:

  • [x] Add CCtx Param.
  • [x] Add CLI Flags.
  • [x] Add tests.

felixhandte avatar Jan 22 '25 16:01 felixhandte

cc @pmeenan, @nidhijaju. We'd talked about this being desirable for adoption of dcz. Take a look and make sure it meets your needs? It should go out in the next Zstd release which is coming very soon.

felixhandte avatar Jan 24 '25 21:01 felixhandte