Skip to content

Commit 41bf8e0

Browse files
[3.14] gh-150583: Fix zstd compression level with digested ZstdDict (GH-150586) (#153884)
gh-150583: Fix zstd compression level with digested ZstdDict (GH-150586) (cherry picked from commit 0983642) Co-authored-by: Rogdham <3994389+Rogdham@users.noreply.github.com>
1 parent 9bd5e97 commit 41bf8e0

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Correctly set the default compression level in :mod:`compression.zstd` when passing a digested
2+
dictionary during compression.

Modules/_zstd/compressor.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ _zstd_ZstdCompressor_new_impl(PyTypeObject *type, PyObject *level,
347347
}
348348

349349
self->use_multithread = 0;
350+
self->compression_level = ZSTD_CLEVEL_DEFAULT;
350351
self->dict = NULL;
351352
self->lock = (PyMutex){0};
352353

0 commit comments

Comments
 (0)