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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac26f68ad0afda2642c8dd10a92f79b5c45434a0fe978f4528f542ce276502f0
4
- data.tar.gz: cd514652d23230593b6ec9971f5286875847da819ba31747136c2e94040d8b2f
3
+ metadata.gz: 743345c216c9251b2ec2bcec5231362bff5571308405ab237590acc6a8ef28c3
4
+ data.tar.gz: 83c867433d047e039f8455575a04c44f6c46081b272d1c7aff67fccfcdda900e
5
5
  SHA512:
6
- metadata.gz: 3def0b1dabc9b717f8ff22f6f5754a219c33e3b5850fb2bf26d59b9eea819b4787f80d78819eb9166151af5ee3bb186a8ea81a707336ee5f4a83313188e5c6bc
7
- data.tar.gz: 95c48e8b498db92b302f612295f1b47953b2f23708dcadbadf534b3710720ca21969913c675c095270839d4163fa978b8d8c0c33eb926153b18b6c90d22c04c5
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::Ddict.new(File.read('dictionary_file'))
147
- data = Zstd.compress(compressed_using_dict, ddict)
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(input_data, dst_size);
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
 
@@ -1,3 +1,3 @@
1
1
  module Zstd
2
- VERSION = "2.0.6"
2
+ VERSION = "2.0.7"
3
3
  end
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 = "MIT"
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.6
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-03-01 00:00:00.000000000 Z
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
- - MIT
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.6.2
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: []