Skip to content

Commit 0983642

Browse files
authored
gh-150583: Fix zstd compression level with digested ZstdDict (#150586)
1 parent 16d0c89 commit 0983642

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)