Skip to content

Commit 6aebed7

Browse files
authored
Use default compression level for zstd (#1080)
JAVA-4868
1 parent 493b248 commit 6aebed7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver-core/src/main/com/mongodb/internal/connection/ZstdCompressor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public void compress(final List<ByteBuf> source, final BsonOutput target) {
4646

4747
try {
4848
byte[] out = new byte[(int) Zstd.compressBound(uncompressedSize)];
49-
int compressedSize = (int) Zstd.compress(out, singleByteArraySource, Zstd.maxCompressionLevel());
49+
int compressedSize = (int) Zstd.compress(out, singleByteArraySource, Zstd.defaultCompressionLevel());
5050
target.writeBytes(out, 0, compressedSize);
5151
} catch (Exception e) {
5252
throw new MongoInternalException("Unexpected exception", e);

0 commit comments

Comments
 (0)