From a24cfefd4725387387a77f5594bfdad1ad48e0c5 Mon Sep 17 00:00:00 2001 From: "Mateusz \"Serafin\" Gajewski" Date: Sat, 20 Jul 2024 09:17:06 +0200 Subject: [PATCH] Update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0d435134..5b58502a 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,12 @@ int uncompressedSize = decompressor.decompress(compressed, 0, compressedSize, un Arena arena = ... MemorySegment data = ... -Compressor compressor = new Lz4JavaCompressor(); +Compressor compressor = Lz4Compressor.create(); MemorySegment compressed = arena.allocate(compressor.maxCompressedLength(toIntExact(data.byteSize()))); int compressedSize = compressor.compress(data, compressed); compressed = compressed.asSlice(0, compressedSize); -Decompressor decompressor = new Lz4JavaDecompressor(); +Decompressor decompressor = Lz4Decompressor.create(); MemorySegment uncompressed = arena.allocate(data.byteSize()); int uncompressedSize = decompressor.decompress(compressed, uncompressed); uncompressed = uncompressed.asSlice(0, uncompressedSize);