-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZSTD_estimateCCtxSize() and ZSTD_compressSequences() #3747
Comments
Hi Ilya, the expectation is that Therefore, if one requests a size for level Occasionally, it might be possible for a higher level to fit in, because, by chance, the technical parameters of this level happen to not require more memory, so it fits. But there is no guarantee, and as the technical definition of "levels" change overtime, this observation may also change across versions. |
Hello Yann, |
Since I don't even know how much it needs, since this combination with edit : one method to get an appropriate size for
There is still a risk that |
Thank you, Yann! |
as a follow up for facebook#3747
as a follow up for facebook#3747
as a follow up for facebook#3747
If allocate memory according to ZSTD_estimateCCtxSize() with level 3 or below, the ZSTD_compressSequences( ) will return error -64 (ZSTD_error_memory_allocation)
With level 4 and above it works fine. Is it expected behavior?
(Of course I'm using it in pair with ZSTD_initStaticCCtx())
If use ZSTD_compressSequences() with ZSTD_createCCtx() no issues what so ever.
The text was updated successfully, but these errors were encountered: