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)
41
41
compressed_data = Zstd .compress(data, complession_level) # default compression_level is 0
42
42
```
43
43
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
+
44
50
### Streaming Compression
45
51
```
46
52
stream = Zstd::StreamingCompress.new
@@ -66,6 +72,12 @@ res << stream.finish
66
72
data = Zstd .decompress(compressed_data)
67
73
```
68
74
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
+
69
81
### Streaming Decompression
70
82
```
71
83
cstr = "" # Compressed data
Original file line number Diff line number Diff line change 1
1
module Zstd
2
- VERSION = "1.5.2.2 "
2
+ VERSION = "1.5.2.3 "
3
3
end
You can’t perform that action at this time.
0 commit comments