zstd-ruby 2.0.6 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/ext/zstdruby/skippable_frame.c +2 -2
- data/lib/zstd-ruby/version.rb +1 -1
- data/zstd-ruby.gemspec +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 743345c216c9251b2ec2bcec5231362bff5571308405ab237590acc6a8ef28c3
|
|
4
|
+
data.tar.gz: 83c867433d047e039f8455575a04c44f6c46081b272d1c7aff67fccfcdda900e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 514f3b696028151ede41e5d56cd3fc83335e0e3714558b15177891c323162a7a49b77f717dc62adda812966edc83fa71c5a05aa5a668fa45b5a577194d66a937
|
|
7
|
+
data.tar.gz: f76066d3ba52a3545982c71e42b805798caab46fa93547f96c5321d4d57c225575abc5fe8b89253c7ec826c1fa45222b40c00cf8a3910c64861044d2a469ae6e
|
data/README.md
CHANGED
|
@@ -116,7 +116,7 @@ res << stream.finish
|
|
|
116
116
|
|
|
117
117
|
#### Streaming Compression with CDict of level 5
|
|
118
118
|
```ruby
|
|
119
|
-
cdict = Zstd::CDict.new(File.read('dictionary_file', 5)
|
|
119
|
+
cdict = Zstd::CDict.new(File.read('dictionary_file'), 5)
|
|
120
120
|
stream = Zstd::StreamingCompress.new(dict: cdict)
|
|
121
121
|
stream << "abc" << "def"
|
|
122
122
|
res = stream.flush
|
|
@@ -143,8 +143,8 @@ Zstd.decompress(compressed_using_dict, dict: File.read('dictionary_file'))
|
|
|
143
143
|
If you use the same dictionary repeatedly, you can speed up the setup by creating DDict in advance:
|
|
144
144
|
|
|
145
145
|
```ruby
|
|
146
|
-
ddict = Zstd::
|
|
147
|
-
data = Zstd.
|
|
146
|
+
ddict = Zstd::DDict.new(File.read('dictionary_file'))
|
|
147
|
+
data = Zstd.decompress(compressed_using_dict, dict: ddict)
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
#### Streaming Decompression
|
|
@@ -17,13 +17,12 @@ static VALUE rb_write_skippable_frame(int argc, VALUE *argv, VALUE self)
|
|
|
17
17
|
|
|
18
18
|
StringValue(input_value);
|
|
19
19
|
StringValue(skip_value);
|
|
20
|
-
char* input_data = RSTRING_PTR(input_value);
|
|
21
20
|
size_t input_size = RSTRING_LEN(input_value);
|
|
22
21
|
char* skip_data = RSTRING_PTR(skip_value);
|
|
23
22
|
size_t skip_size = RSTRING_LEN(skip_value);
|
|
24
23
|
|
|
25
24
|
size_t dst_size = input_size + ZSTD_SKIPPABLEHEADERSIZE + skip_size;
|
|
26
|
-
VALUE output = rb_str_new(
|
|
25
|
+
VALUE output = rb_str_new(NULL, dst_size);
|
|
27
26
|
char* output_data = RSTRING_PTR(output);
|
|
28
27
|
size_t output_size = ZSTD_writeSkippableFrame((void*)output_data, dst_size, (const void*)skip_data, skip_size, magic_variant);
|
|
29
28
|
if (ZSTD_isError(output_size)) {
|
|
@@ -36,6 +35,7 @@ static VALUE rb_write_skippable_frame(int argc, VALUE *argv, VALUE self)
|
|
|
36
35
|
|
|
37
36
|
static VALUE rb_read_skippable_frame(VALUE self, VALUE input_value)
|
|
38
37
|
{
|
|
38
|
+
StringValue(input_value);
|
|
39
39
|
char* input_data = RSTRING_PTR(input_value);
|
|
40
40
|
size_t input_size = RSTRING_LEN(input_value);
|
|
41
41
|
|
data/lib/zstd-ruby/version.rb
CHANGED
data/zstd-ruby.gemspec
CHANGED
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
|
12
12
|
spec.summary = %q{Ruby binding for zstd(Zstandard - Fast real-time compression algorithm)}
|
|
13
13
|
spec.description = %q{Ruby binding for zstd(Zstandard - Fast real-time compression algorithm). See https://github.com/facebook/zstd}
|
|
14
14
|
spec.homepage = "https://github.com/SpringMT/zstd-ruby"
|
|
15
|
-
spec.license = "
|
|
15
|
+
spec.license = "BSD-3-Clause"
|
|
16
16
|
|
|
17
17
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
|
18
18
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zstd-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SpringMT
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: exe
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
11
|
+
date: 2026-08-06 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: bundler
|
|
@@ -186,8 +187,9 @@ files:
|
|
|
186
187
|
- zstd-ruby.gemspec
|
|
187
188
|
homepage: https://github.com/SpringMT/zstd-ruby
|
|
188
189
|
licenses:
|
|
189
|
-
-
|
|
190
|
+
- BSD-3-Clause
|
|
190
191
|
metadata: {}
|
|
192
|
+
post_install_message:
|
|
191
193
|
rdoc_options: []
|
|
192
194
|
require_paths:
|
|
193
195
|
- lib
|
|
@@ -202,7 +204,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
202
204
|
- !ruby/object:Gem::Version
|
|
203
205
|
version: '0'
|
|
204
206
|
requirements: []
|
|
205
|
-
rubygems_version: 3.
|
|
207
|
+
rubygems_version: 3.4.19
|
|
208
|
+
signing_key:
|
|
206
209
|
specification_version: 4
|
|
207
210
|
summary: Ruby binding for zstd(Zstandard - Fast real-time compression algorithm)
|
|
208
211
|
test_files: []
|