Skip to content

Commit

Permalink
Use default compression level for zstd (mongodb#1080)
Browse files Browse the repository at this point in the history
JAVA-4868
  • Loading branch information
katcharov authored Feb 6, 2023
1 parent 493b248 commit 6aebed7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void compress(final List<ByteBuf> source, final BsonOutput target) {

try {
byte[] out = new byte[(int) Zstd.compressBound(uncompressedSize)];
int compressedSize = (int) Zstd.compress(out, singleByteArraySource, Zstd.maxCompressionLevel());
int compressedSize = (int) Zstd.compress(out, singleByteArraySource, Zstd.defaultCompressionLevel());
target.writeBytes(out, 0, compressedSize);
} catch (Exception e) {
throw new MongoInternalException("Unexpected exception", e);
Expand Down

0 comments on commit 6aebed7

Please sign in to comment.