zstd-ruby 1.4.5.0 → 1.5.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) 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 +2 -1
  6. data/ext/zstdruby/libzstd/BUCK +5 -7
  7. data/ext/zstdruby/libzstd/Makefile +225 -222
  8. data/ext/zstdruby/libzstd/README.md +43 -5
  9. data/ext/zstdruby/libzstd/common/bitstream.h +46 -22
  10. data/ext/zstdruby/libzstd/common/compiler.h +182 -22
  11. data/ext/zstdruby/libzstd/common/cpu.h +1 -3
  12. data/ext/zstdruby/libzstd/common/debug.c +1 -1
  13. data/ext/zstdruby/libzstd/common/debug.h +12 -19
  14. data/ext/zstdruby/libzstd/common/entropy_common.c +196 -44
  15. data/ext/zstdruby/libzstd/common/error_private.c +2 -1
  16. data/ext/zstdruby/libzstd/common/error_private.h +82 -3
  17. data/ext/zstdruby/libzstd/common/fse.h +41 -12
  18. data/ext/zstdruby/libzstd/common/fse_decompress.c +139 -22
  19. data/ext/zstdruby/libzstd/common/huf.h +47 -23
  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 +2 -2
  23. data/ext/zstdruby/libzstd/common/portability_macros.h +131 -0
  24. data/ext/zstdruby/libzstd/common/threading.c +6 -5
  25. data/ext/zstdruby/libzstd/common/xxhash.c +6 -846
  26. data/ext/zstdruby/libzstd/common/xxhash.h +5568 -167
  27. data/ext/zstdruby/libzstd/common/zstd_common.c +10 -10
  28. data/ext/zstdruby/libzstd/common/zstd_deps.h +111 -0
  29. data/ext/zstdruby/libzstd/common/zstd_internal.h +189 -142
  30. data/ext/zstdruby/libzstd/common/zstd_trace.h +163 -0
  31. data/ext/zstdruby/libzstd/compress/clevels.h +134 -0
  32. data/ext/zstdruby/libzstd/compress/fse_compress.c +89 -46
  33. data/ext/zstdruby/libzstd/compress/hist.c +27 -29
  34. data/ext/zstdruby/libzstd/compress/hist.h +2 -2
  35. data/ext/zstdruby/libzstd/compress/huf_compress.c +770 -198
  36. data/ext/zstdruby/libzstd/compress/zstd_compress.c +2894 -863
  37. data/ext/zstdruby/libzstd/compress/zstd_compress_internal.h +390 -90
  38. data/ext/zstdruby/libzstd/compress/zstd_compress_literals.c +12 -11
  39. data/ext/zstdruby/libzstd/compress/zstd_compress_literals.h +4 -2
  40. data/ext/zstdruby/libzstd/compress/zstd_compress_sequences.c +31 -8
  41. data/ext/zstdruby/libzstd/compress/zstd_compress_sequences.h +1 -1
  42. data/ext/zstdruby/libzstd/compress/zstd_compress_superblock.c +25 -297
  43. data/ext/zstdruby/libzstd/compress/zstd_compress_superblock.h +1 -1
  44. data/ext/zstdruby/libzstd/compress/zstd_cwksp.h +206 -69
  45. data/ext/zstdruby/libzstd/compress/zstd_double_fast.c +307 -132
  46. data/ext/zstdruby/libzstd/compress/zstd_double_fast.h +1 -1
  47. data/ext/zstdruby/libzstd/compress/zstd_fast.c +322 -143
  48. data/ext/zstdruby/libzstd/compress/zstd_fast.h +1 -1
  49. data/ext/zstdruby/libzstd/compress/zstd_lazy.c +1136 -174
  50. data/ext/zstdruby/libzstd/compress/zstd_lazy.h +59 -1
  51. data/ext/zstdruby/libzstd/compress/zstd_ldm.c +316 -213
  52. data/ext/zstdruby/libzstd/compress/zstd_ldm.h +9 -2
  53. data/ext/zstdruby/libzstd/compress/zstd_ldm_geartab.h +106 -0
  54. data/ext/zstdruby/libzstd/compress/zstd_opt.c +373 -150
  55. data/ext/zstdruby/libzstd/compress/zstd_opt.h +1 -1
  56. data/ext/zstdruby/libzstd/compress/zstdmt_compress.c +152 -444
  57. data/ext/zstdruby/libzstd/compress/zstdmt_compress.h +31 -113
  58. data/ext/zstdruby/libzstd/decompress/huf_decompress.c +1044 -403
  59. data/ext/zstdruby/libzstd/decompress/huf_decompress_amd64.S +571 -0
  60. data/ext/zstdruby/libzstd/decompress/zstd_ddict.c +9 -9
  61. data/ext/zstdruby/libzstd/decompress/zstd_ddict.h +2 -2
  62. data/ext/zstdruby/libzstd/decompress/zstd_decompress.c +450 -105
  63. data/ext/zstdruby/libzstd/decompress/zstd_decompress_block.c +913 -273
  64. data/ext/zstdruby/libzstd/decompress/zstd_decompress_block.h +14 -5
  65. data/ext/zstdruby/libzstd/decompress/zstd_decompress_internal.h +59 -12
  66. data/ext/zstdruby/libzstd/deprecated/zbuff.h +1 -1
  67. data/ext/zstdruby/libzstd/deprecated/zbuff_common.c +1 -1
  68. data/ext/zstdruby/libzstd/deprecated/zbuff_compress.c +24 -4
  69. data/ext/zstdruby/libzstd/deprecated/zbuff_decompress.c +1 -1
  70. data/ext/zstdruby/libzstd/dictBuilder/cover.c +55 -38
  71. data/ext/zstdruby/libzstd/dictBuilder/cover.h +7 -6
  72. data/ext/zstdruby/libzstd/dictBuilder/divsufsort.c +1 -1
  73. data/ext/zstdruby/libzstd/dictBuilder/fastcover.c +43 -34
  74. data/ext/zstdruby/libzstd/dictBuilder/zdict.c +128 -58
  75. data/ext/zstdruby/libzstd/dll/example/Makefile +1 -1
  76. data/ext/zstdruby/libzstd/dll/example/README.md +16 -22
  77. data/ext/zstdruby/libzstd/legacy/zstd_legacy.h +1 -1
  78. data/ext/zstdruby/libzstd/legacy/zstd_v01.c +8 -8
  79. data/ext/zstdruby/libzstd/legacy/zstd_v01.h +1 -1
  80. data/ext/zstdruby/libzstd/legacy/zstd_v02.c +9 -9
  81. data/ext/zstdruby/libzstd/legacy/zstd_v02.h +1 -1
  82. data/ext/zstdruby/libzstd/legacy/zstd_v03.c +9 -9
  83. data/ext/zstdruby/libzstd/legacy/zstd_v03.h +1 -1
  84. data/ext/zstdruby/libzstd/legacy/zstd_v04.c +10 -10
  85. data/ext/zstdruby/libzstd/legacy/zstd_v04.h +1 -1
  86. data/ext/zstdruby/libzstd/legacy/zstd_v05.c +13 -13
  87. data/ext/zstdruby/libzstd/legacy/zstd_v05.h +1 -1
  88. data/ext/zstdruby/libzstd/legacy/zstd_v06.c +13 -13
  89. data/ext/zstdruby/libzstd/legacy/zstd_v06.h +1 -1
  90. data/ext/zstdruby/libzstd/legacy/zstd_v07.c +13 -13
  91. data/ext/zstdruby/libzstd/legacy/zstd_v07.h +1 -1
  92. data/ext/zstdruby/libzstd/libzstd.mk +185 -0
  93. data/ext/zstdruby/libzstd/libzstd.pc.in +4 -3
  94. data/ext/zstdruby/libzstd/modulemap/module.modulemap +4 -0
  95. data/ext/zstdruby/libzstd/{dictBuilder/zdict.h → zdict.h} +154 -7
  96. data/ext/zstdruby/libzstd/zstd.h +699 -214
  97. data/ext/zstdruby/libzstd/{common/zstd_errors.h → zstd_errors.h} +2 -1
  98. data/ext/zstdruby/zstdruby.c +2 -2
  99. data/lib/zstd-ruby/version.rb +1 -1
  100. metadata +15 -6
  101. data/.travis.yml +0 -14
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016-2020, 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
@@ -77,6 +77,7 @@ typedef enum {
77
77
  ZSTD_error_frameIndex_tooLarge = 100,
78
78
  ZSTD_error_seekableIO = 102,
79
79
  ZSTD_error_dstBuffer_wrong = 104,
80
+ ZSTD_error_srcBuffer_wrong = 105,
80
81
  ZSTD_error_maxCode = 120 /* never EVER use this value directly, it can change in future versions! Use ZSTD_isError() instead */
81
82
  } ZSTD_ErrorCode;
82
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.5.0"
2
+ VERSION = "1.5.1.1"
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.5.0
4
+ version: 1.5.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - SpringMT
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-27 00:00:00.000000000 Z
11
+ date: 2021-12-28 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
@@ -133,11 +137,13 @@ files:
133
137
  - ext/zstdruby/libzstd/compress/zstd_lazy.h
134
138
  - ext/zstdruby/libzstd/compress/zstd_ldm.c
135
139
  - ext/zstdruby/libzstd/compress/zstd_ldm.h
140
+ - ext/zstdruby/libzstd/compress/zstd_ldm_geartab.h
136
141
  - ext/zstdruby/libzstd/compress/zstd_opt.c
137
142
  - ext/zstdruby/libzstd/compress/zstd_opt.h
138
143
  - ext/zstdruby/libzstd/compress/zstdmt_compress.c
139
144
  - ext/zstdruby/libzstd/compress/zstdmt_compress.h
140
145
  - ext/zstdruby/libzstd/decompress/huf_decompress.c
146
+ - ext/zstdruby/libzstd/decompress/huf_decompress_amd64.S
141
147
  - ext/zstdruby/libzstd/decompress/zstd_ddict.c
142
148
  - ext/zstdruby/libzstd/decompress/zstd_ddict.h
143
149
  - ext/zstdruby/libzstd/decompress/zstd_decompress.c
@@ -154,7 +160,6 @@ files:
154
160
  - ext/zstdruby/libzstd/dictBuilder/divsufsort.h
155
161
  - ext/zstdruby/libzstd/dictBuilder/fastcover.c
156
162
  - ext/zstdruby/libzstd/dictBuilder/zdict.c
157
- - ext/zstdruby/libzstd/dictBuilder/zdict.h
158
163
  - ext/zstdruby/libzstd/dll/example/Makefile
159
164
  - ext/zstdruby/libzstd/dll/example/README.md
160
165
  - ext/zstdruby/libzstd/dll/example/build_package.bat
@@ -175,8 +180,12 @@ files:
175
180
  - ext/zstdruby/libzstd/legacy/zstd_v06.h
176
181
  - ext/zstdruby/libzstd/legacy/zstd_v07.c
177
182
  - ext/zstdruby/libzstd/legacy/zstd_v07.h
183
+ - ext/zstdruby/libzstd/libzstd.mk
178
184
  - ext/zstdruby/libzstd/libzstd.pc.in
185
+ - ext/zstdruby/libzstd/modulemap/module.modulemap
186
+ - ext/zstdruby/libzstd/zdict.h
179
187
  - ext/zstdruby/libzstd/zstd.h
188
+ - ext/zstdruby/libzstd/zstd_errors.h
180
189
  - ext/zstdruby/zstdruby.c
181
190
  - ext/zstdruby/zstdruby.h
182
191
  - lib/zstd-ruby.rb
@@ -201,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
210
  - !ruby/object:Gem::Version
202
211
  version: '0'
203
212
  requirements: []
204
- rubygems_version: 3.0.3
213
+ rubygems_version: 3.3.3
205
214
  signing_key:
206
215
  specification_version: 4
207
216
  summary: Ruby binding for zstd(Zstandard - Fast real-time compression algorithm)
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