zstd-ruby 1.4.4.0 → 1.5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +8 -0
  3. data/.github/workflows/ruby.yml +35 -0
  4. data/README.md +2 -2
  5. data/ext/zstdruby/extconf.rb +1 -0
  6. data/ext/zstdruby/libzstd/BUCK +5 -7
  7. data/ext/zstdruby/libzstd/Makefile +241 -173
  8. data/ext/zstdruby/libzstd/README.md +76 -18
  9. data/ext/zstdruby/libzstd/common/bitstream.h +75 -57
  10. data/ext/zstdruby/libzstd/common/compiler.h +196 -20
  11. data/ext/zstdruby/libzstd/common/cpu.h +1 -3
  12. data/ext/zstdruby/libzstd/common/debug.c +11 -31
  13. data/ext/zstdruby/libzstd/common/debug.h +22 -49
  14. data/ext/zstdruby/libzstd/common/entropy_common.c +208 -76
  15. data/ext/zstdruby/libzstd/common/error_private.c +3 -1
  16. data/ext/zstdruby/libzstd/common/error_private.h +87 -4
  17. data/ext/zstdruby/libzstd/common/fse.h +51 -42
  18. data/ext/zstdruby/libzstd/common/fse_decompress.c +149 -57
  19. data/ext/zstdruby/libzstd/common/huf.h +60 -54
  20. data/ext/zstdruby/libzstd/common/mem.h +87 -98
  21. data/ext/zstdruby/libzstd/common/pool.c +23 -17
  22. data/ext/zstdruby/libzstd/common/pool.h +3 -3
  23. data/ext/zstdruby/libzstd/common/portability_macros.h +131 -0
  24. data/ext/zstdruby/libzstd/common/threading.c +10 -8
  25. data/ext/zstdruby/libzstd/common/threading.h +4 -3
  26. data/ext/zstdruby/libzstd/common/xxhash.c +15 -873
  27. data/ext/zstdruby/libzstd/common/xxhash.h +5572 -191
  28. data/ext/zstdruby/libzstd/common/zstd_common.c +10 -10
  29. data/ext/zstdruby/libzstd/common/zstd_deps.h +111 -0
  30. data/ext/zstdruby/libzstd/common/zstd_internal.h +252 -108
  31. data/ext/zstdruby/libzstd/common/zstd_trace.h +163 -0
  32. data/ext/zstdruby/libzstd/compress/clevels.h +134 -0
  33. data/ext/zstdruby/libzstd/compress/fse_compress.c +105 -85
  34. data/ext/zstdruby/libzstd/compress/hist.c +41 -63
  35. data/ext/zstdruby/libzstd/compress/hist.h +13 -33
  36. data/ext/zstdruby/libzstd/compress/huf_compress.c +831 -259
  37. data/ext/zstdruby/libzstd/compress/zstd_compress.c +3213 -1007
  38. data/ext/zstdruby/libzstd/compress/zstd_compress_internal.h +493 -71
  39. data/ext/zstdruby/libzstd/compress/zstd_compress_literals.c +21 -16
  40. data/ext/zstdruby/libzstd/compress/zstd_compress_literals.h +4 -2
  41. data/ext/zstdruby/libzstd/compress/zstd_compress_sequences.c +51 -24
  42. data/ext/zstdruby/libzstd/compress/zstd_compress_sequences.h +10 -3
  43. data/ext/zstdruby/libzstd/compress/zstd_compress_superblock.c +573 -0
  44. data/ext/zstdruby/libzstd/compress/zstd_compress_superblock.h +32 -0
  45. data/ext/zstdruby/libzstd/compress/zstd_cwksp.h +208 -81
  46. data/ext/zstdruby/libzstd/compress/zstd_double_fast.c +315 -137
  47. data/ext/zstdruby/libzstd/compress/zstd_double_fast.h +2 -2
  48. data/ext/zstdruby/libzstd/compress/zstd_fast.c +319 -128
  49. data/ext/zstdruby/libzstd/compress/zstd_fast.h +2 -2
  50. data/ext/zstdruby/libzstd/compress/zstd_lazy.c +1156 -171
  51. data/ext/zstdruby/libzstd/compress/zstd_lazy.h +59 -1
  52. data/ext/zstdruby/libzstd/compress/zstd_ldm.c +331 -206
  53. data/ext/zstdruby/libzstd/compress/zstd_ldm.h +15 -3
  54. data/ext/zstdruby/libzstd/compress/zstd_ldm_geartab.h +106 -0
  55. data/ext/zstdruby/libzstd/compress/zstd_opt.c +403 -226
  56. data/ext/zstdruby/libzstd/compress/zstd_opt.h +1 -1
  57. data/ext/zstdruby/libzstd/compress/zstdmt_compress.c +188 -453
  58. data/ext/zstdruby/libzstd/compress/zstdmt_compress.h +32 -114
  59. data/ext/zstdruby/libzstd/decompress/huf_decompress.c +1065 -410
  60. data/ext/zstdruby/libzstd/decompress/huf_decompress_amd64.S +571 -0
  61. data/ext/zstdruby/libzstd/decompress/zstd_ddict.c +20 -16
  62. data/ext/zstdruby/libzstd/decompress/zstd_ddict.h +3 -3
  63. data/ext/zstdruby/libzstd/decompress/zstd_decompress.c +691 -230
  64. data/ext/zstdruby/libzstd/decompress/zstd_decompress_block.c +1072 -323
  65. data/ext/zstdruby/libzstd/decompress/zstd_decompress_block.h +16 -7
  66. data/ext/zstdruby/libzstd/decompress/zstd_decompress_internal.h +71 -10
  67. data/ext/zstdruby/libzstd/deprecated/zbuff.h +3 -3
  68. data/ext/zstdruby/libzstd/deprecated/zbuff_common.c +2 -2
  69. data/ext/zstdruby/libzstd/deprecated/zbuff_compress.c +24 -4
  70. data/ext/zstdruby/libzstd/deprecated/zbuff_decompress.c +1 -1
  71. data/ext/zstdruby/libzstd/dictBuilder/cover.c +57 -40
  72. data/ext/zstdruby/libzstd/dictBuilder/cover.h +20 -9
  73. data/ext/zstdruby/libzstd/dictBuilder/divsufsort.c +1 -1
  74. data/ext/zstdruby/libzstd/dictBuilder/fastcover.c +54 -35
  75. data/ext/zstdruby/libzstd/dictBuilder/zdict.c +151 -57
  76. data/ext/zstdruby/libzstd/dll/example/Makefile +2 -1
  77. data/ext/zstdruby/libzstd/dll/example/README.md +16 -22
  78. data/ext/zstdruby/libzstd/legacy/zstd_legacy.h +4 -4
  79. data/ext/zstdruby/libzstd/legacy/zstd_v01.c +25 -19
  80. data/ext/zstdruby/libzstd/legacy/zstd_v01.h +1 -1
  81. data/ext/zstdruby/libzstd/legacy/zstd_v02.c +18 -14
  82. data/ext/zstdruby/libzstd/legacy/zstd_v02.h +1 -1
  83. data/ext/zstdruby/libzstd/legacy/zstd_v03.c +18 -14
  84. data/ext/zstdruby/libzstd/legacy/zstd_v03.h +1 -1
  85. data/ext/zstdruby/libzstd/legacy/zstd_v04.c +22 -16
  86. data/ext/zstdruby/libzstd/legacy/zstd_v04.h +1 -1
  87. data/ext/zstdruby/libzstd/legacy/zstd_v05.c +29 -25
  88. data/ext/zstdruby/libzstd/legacy/zstd_v05.h +2 -2
  89. data/ext/zstdruby/libzstd/legacy/zstd_v06.c +29 -25
  90. data/ext/zstdruby/libzstd/legacy/zstd_v06.h +1 -1
  91. data/ext/zstdruby/libzstd/legacy/zstd_v07.c +34 -26
  92. data/ext/zstdruby/libzstd/legacy/zstd_v07.h +1 -1
  93. data/ext/zstdruby/libzstd/libzstd.mk +185 -0
  94. data/ext/zstdruby/libzstd/libzstd.pc.in +4 -3
  95. data/ext/zstdruby/libzstd/modulemap/module.modulemap +4 -0
  96. data/ext/zstdruby/libzstd/{dictBuilder/zdict.h → zdict.h} +201 -31
  97. data/ext/zstdruby/libzstd/zstd.h +760 -234
  98. data/ext/zstdruby/libzstd/{common/zstd_errors.h → zstd_errors.h} +3 -1
  99. data/ext/zstdruby/zstdruby.c +2 -2
  100. data/lib/zstd-ruby/version.rb +1 -1
  101. metadata +20 -9
  102. data/.travis.yml +0 -14
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
2
+ * Copyright (c) Yann Collet, Facebook, Inc.
3
3
  * All rights reserved.
4
4
  *
5
5
  * This source code is licensed under both the BSD-style license (found in the
@@ -76,6 +76,8 @@ typedef enum {
76
76
  /* following error codes are __NOT STABLE__, they can be removed or changed in future versions */
77
77
  ZSTD_error_frameIndex_tooLarge = 100,
78
78
  ZSTD_error_seekableIO = 102,
79
+ ZSTD_error_dstBuffer_wrong = 104,
80
+ ZSTD_error_srcBuffer_wrong = 105,
79
81
  ZSTD_error_maxCode = 120 /* never EVER use this value directly, it can change in future versions! Use ZSTD_isError() instead */
80
82
  } ZSTD_ErrorCode;
81
83
 
@@ -13,7 +13,7 @@ static VALUE compress(int argc, VALUE *argv, VALUE self)
13
13
  VALUE compression_level_value;
14
14
  rb_scan_args(argc, argv, "11", &input_value, &compression_level_value);
15
15
 
16
- Check_Type(input_value, RUBY_T_STRING);
16
+ StringValue(input_value);
17
17
  const char* input_data = RSTRING_PTR(input_value);
18
18
  size_t input_size = RSTRING_LEN(input_value);
19
19
 
@@ -81,7 +81,7 @@ static VALUE decompress_buffered(const char* input_data, size_t input_size)
81
81
 
82
82
  static VALUE decompress(VALUE self, VALUE input)
83
83
  {
84
- Check_Type(input, T_STRING);
84
+ StringValue(input);
85
85
  const char* input_data = RSTRING_PTR(input);
86
86
  size_t input_size = RSTRING_LEN(input);
87
87
 
@@ -1,3 +1,3 @@
1
1
  module Zstd
2
- VERSION = "1.4.4.0"
2
+ VERSION = "1.5.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zstd-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4.0
4
+ version: 1.5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SpringMT
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-06 00:00:00.000000000 Z
11
+ date: 2021-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -75,10 +75,11 @@ extensions:
75
75
  - ext/zstdruby/extconf.rb
76
76
  extra_rdoc_files: []
77
77
  files:
78
+ - ".github/dependabot.yml"
79
+ - ".github/workflows/ruby.yml"
78
80
  - ".gitignore"
79
81
  - ".gitmodules"
80
82
  - ".rspec"
81
- - ".travis.yml"
82
83
  - CODE_OF_CONDUCT.md
83
84
  - Gemfile
84
85
  - LICENSE.txt
@@ -105,13 +106,16 @@ files:
105
106
  - ext/zstdruby/libzstd/common/mem.h
106
107
  - ext/zstdruby/libzstd/common/pool.c
107
108
  - ext/zstdruby/libzstd/common/pool.h
109
+ - ext/zstdruby/libzstd/common/portability_macros.h
108
110
  - ext/zstdruby/libzstd/common/threading.c
109
111
  - ext/zstdruby/libzstd/common/threading.h
110
112
  - ext/zstdruby/libzstd/common/xxhash.c
111
113
  - ext/zstdruby/libzstd/common/xxhash.h
112
114
  - ext/zstdruby/libzstd/common/zstd_common.c
113
- - ext/zstdruby/libzstd/common/zstd_errors.h
115
+ - ext/zstdruby/libzstd/common/zstd_deps.h
114
116
  - ext/zstdruby/libzstd/common/zstd_internal.h
117
+ - ext/zstdruby/libzstd/common/zstd_trace.h
118
+ - ext/zstdruby/libzstd/compress/clevels.h
115
119
  - ext/zstdruby/libzstd/compress/fse_compress.c
116
120
  - ext/zstdruby/libzstd/compress/hist.c
117
121
  - ext/zstdruby/libzstd/compress/hist.h
@@ -122,6 +126,8 @@ files:
122
126
  - ext/zstdruby/libzstd/compress/zstd_compress_literals.h
123
127
  - ext/zstdruby/libzstd/compress/zstd_compress_sequences.c
124
128
  - ext/zstdruby/libzstd/compress/zstd_compress_sequences.h
129
+ - ext/zstdruby/libzstd/compress/zstd_compress_superblock.c
130
+ - ext/zstdruby/libzstd/compress/zstd_compress_superblock.h
125
131
  - ext/zstdruby/libzstd/compress/zstd_cwksp.h
126
132
  - ext/zstdruby/libzstd/compress/zstd_double_fast.c
127
133
  - ext/zstdruby/libzstd/compress/zstd_double_fast.h
@@ -131,11 +137,13 @@ files:
131
137
  - ext/zstdruby/libzstd/compress/zstd_lazy.h
132
138
  - ext/zstdruby/libzstd/compress/zstd_ldm.c
133
139
  - ext/zstdruby/libzstd/compress/zstd_ldm.h
140
+ - ext/zstdruby/libzstd/compress/zstd_ldm_geartab.h
134
141
  - ext/zstdruby/libzstd/compress/zstd_opt.c
135
142
  - ext/zstdruby/libzstd/compress/zstd_opt.h
136
143
  - ext/zstdruby/libzstd/compress/zstdmt_compress.c
137
144
  - ext/zstdruby/libzstd/compress/zstdmt_compress.h
138
145
  - ext/zstdruby/libzstd/decompress/huf_decompress.c
146
+ - ext/zstdruby/libzstd/decompress/huf_decompress_amd64.S
139
147
  - ext/zstdruby/libzstd/decompress/zstd_ddict.c
140
148
  - ext/zstdruby/libzstd/decompress/zstd_ddict.h
141
149
  - ext/zstdruby/libzstd/decompress/zstd_decompress.c
@@ -152,7 +160,6 @@ files:
152
160
  - ext/zstdruby/libzstd/dictBuilder/divsufsort.h
153
161
  - ext/zstdruby/libzstd/dictBuilder/fastcover.c
154
162
  - ext/zstdruby/libzstd/dictBuilder/zdict.c
155
- - ext/zstdruby/libzstd/dictBuilder/zdict.h
156
163
  - ext/zstdruby/libzstd/dll/example/Makefile
157
164
  - ext/zstdruby/libzstd/dll/example/README.md
158
165
  - ext/zstdruby/libzstd/dll/example/build_package.bat
@@ -173,8 +180,12 @@ files:
173
180
  - ext/zstdruby/libzstd/legacy/zstd_v06.h
174
181
  - ext/zstdruby/libzstd/legacy/zstd_v07.c
175
182
  - ext/zstdruby/libzstd/legacy/zstd_v07.h
183
+ - ext/zstdruby/libzstd/libzstd.mk
176
184
  - ext/zstdruby/libzstd/libzstd.pc.in
185
+ - ext/zstdruby/libzstd/modulemap/module.modulemap
186
+ - ext/zstdruby/libzstd/zdict.h
177
187
  - ext/zstdruby/libzstd/zstd.h
188
+ - ext/zstdruby/libzstd/zstd_errors.h
178
189
  - ext/zstdruby/zstdruby.c
179
190
  - ext/zstdruby/zstdruby.h
180
191
  - lib/zstd-ruby.rb
@@ -184,7 +195,7 @@ homepage: https://github.com/SpringMT/zstd-ruby
184
195
  licenses:
185
196
  - MIT
186
197
  metadata: {}
187
- post_install_message:
198
+ post_install_message:
188
199
  rdoc_options: []
189
200
  require_paths:
190
201
  - lib
@@ -199,8 +210,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
210
  - !ruby/object:Gem::Version
200
211
  version: '0'
201
212
  requirements: []
202
- rubygems_version: 3.0.3
203
- signing_key:
213
+ rubygems_version: 3.3.3
214
+ signing_key:
204
215
  specification_version: 4
205
216
  summary: Ruby binding for zstd(Zstandard - Fast real-time compression algorithm)
206
217
  test_files: []
data/.travis.yml DELETED
@@ -1,14 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.6
5
- - 2.5
6
- - 2.4
7
- - 2.3
8
- - 2.2
9
-
10
- before_install:
11
- - gem install bundler -v 1.14.3
12
-
13
- before_script:
14
- - bundle exec rake compile