You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dctx =Zstd::DContext.new(dict: dictionary) # With dictionary
193
211
```
194
212
195
-
### Stream Writer and Reader Wrapper
196
-
**EXPERIMENTAL**
213
+
-`decompress(compressed_data)` → String
197
214
198
-
* These features are experimental and may be subject to API changes in future releases.
199
-
* There may be performance and compatibility issues, so extensive testing is required before production use.
200
-
* If you have any questions, encounter bugs, or have suggestions, please report them via [GitHub issues](https://github.com/SpringMT/zstd-ruby/issues).
| Specialized needs |`Zstd::CContext/DContext`| Direct API access |
219
235
220
-
```ruby
221
-
require'stringio'
222
-
require'zstd-ruby'# Add the appropriate require statement if necessary
236
+
**Compression Levels:** 1-3 (fast, 3 is default), 9-19 (better compression)
223
237
224
-
io =StringIO.new(compressed_data)
225
-
reader =Zstd::StreamReader.new(io)
238
+
## Benchmarks
226
239
227
-
# Read and output the decompressed data
228
-
puts reader.read(10) # 'abc'
229
-
puts reader.read(10) # 'def'
230
-
puts reader.read(10) # '' (end of data)
231
-
```
240
+
To test performance on your system:
232
241
242
+
```bash
243
+
cd benchmarks
244
+
ruby quick_benchmark.rb # Fast overview of all APIs (recommended)
245
+
```
233
246
234
247
## JRuby
235
248
This gem does not support JRuby.
@@ -266,7 +279,6 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
266
279
267
280
Bug reports and pull requests are welcome on GitHub at https://github.com/SpringMT/zstd-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
268
281
269
-
270
282
## License
271
283
272
284
The gem is available as open source under the terms of the [BSD-3-Clause License](https://opensource.org/licenses/BSD-3-Clause).
0 commit comments