File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,12 @@ compressed_data = Zstd.compress(data)
4141compressed_data = Zstd .compress(data, complession_level) # default compression_level is 0
4242```
4343
44+ ### Compression using Dictionary
45+ ``` ruby
46+ # dictionary is supposed to have been created using `zstd --train`
47+ compressed_using_dict = Zstd .compress_using_dict(" " , dictionary)
48+ ```
49+
4450### Streaming Compression
4551```
4652stream = Zstd::StreamingCompress.new
@@ -66,6 +72,12 @@ res << stream.finish
6672data = Zstd .decompress(compressed_data)
6773```
6874
75+ ### Decomporession using Dictionary
76+ ``` ruby
77+ # dictionary is supposed to have been created using `zstd --train`
78+ Zstd .decompress_using_dict(compressed_using_dict, dictionary)
79+ ```
80+
6981### Streaming Decompression
7082```
7183cstr = "" # Compressed data
Original file line number Diff line number Diff line change 11module Zstd
2- VERSION = "1.5.2.2 "
2+ VERSION = "1.5.2.3 "
33end
You can’t perform that action at this time.
0 commit comments