diff --git a/server/src/main/java/org/elasticsearch/index/codec/zstd/Zstd814StoredFieldsFormat.java b/server/src/main/java/org/elasticsearch/index/codec/zstd/Zstd814StoredFieldsFormat.java index 635bd7ffdff4d..e52397581ae08 100644 --- a/server/src/main/java/org/elasticsearch/index/codec/zstd/Zstd814StoredFieldsFormat.java +++ b/server/src/main/java/org/elasticsearch/index/codec/zstd/Zstd814StoredFieldsFormat.java @@ -132,7 +132,7 @@ public void decompress(DataInput in, int originalLength, int offset, int length, } src.buffer().flip(); - final int decompressedLen = zstd.decompress(dest.buffer(), src.buffer()); + final int decompressedLen = zstd.decompress(dest, src); if (decompressedLen != originalLength) { throw new CorruptIndexException("Expected " + originalLength + " decompressed bytes, got " + decompressedLen, in); } @@ -183,7 +183,7 @@ public void compress(ByteBuffersDataInput buffersInput, DataOutput out) throws I } src.buffer().flip(); - final int compressedLen = zstd.compress(dest.buffer(), src.buffer(), level); + final int compressedLen = zstd.compress(dest, src, level); out.writeVInt(compressedLen); for (int written = 0; written < compressedLen;) {