Conversation
Inspired by #3395, offer a new capability to set all parameters defined in a ZSTD_compressionParameters structure with a single symbol invocation to improve user code brevity.
embg
left a comment
There was a problem hiding this comment.
LGTM, just one small nit and one potential issue that might require changes (hence, I am requesting changes). Feel free to land if changes aren't required.
|
Hm... I just thought of a possible issue. You are assuming all the parameters in |
|
That's a very good point @embg . That's indeed the case : That being said, I agree this situation is not clear for users, so adding a code comment to specify this behavior would be helpful. |
Thanks for the pointer. Another question for my own understanding: how does this work for single-threaded compression? E.g. if ZSTD_CCtx_setCParams() is called in the middle of a frame, during streaming compression? |
If (allowed) parameters are changed during single-threaded streaming compression, actually nothing changes for the current compression session. Changes are merely registered into |
Inspired by @terrelln in #3395,
offer a new capability to set all parameters defined in a
ZSTD_compressionParametersstructure with a single symbol invocation to improve user code brevity.