From 37802a4e4c7022b1747cce423cd877eb4e072997 Mon Sep 17 00:00:00 2001 From: Oleg Stepanischev Date: Thu, 1 Feb 2024 21:44:48 +0300 Subject: [PATCH] Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index f8daa4d..996efc6 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,15 @@ using var decompressionStream = new DecompressionStream(input); decompressionStream.CopyTo(output); ``` +Multi-threaded compression: +```c# +using var input = File.OpenRead("dickens"); +using var output = File.OpenWrite("dickens.zst"); +using var compressionStream = new CompressionStream(output, level); +compressionStream.SetParameter(ZSTD_cParameter.ZSTD_c_nbWorkers, Environment.ProcessorCount); +input.CopyTo(compressionStream); +``` + # Benchmark