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.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +8 -0
- data/.github/workflows/ruby.yml +35 -0
- data/README.md +2 -2
- data/ext/zstdruby/extconf.rb +1 -0
- data/ext/zstdruby/libzstd/BUCK +5 -7
- data/ext/zstdruby/libzstd/Makefile +241 -173
- data/ext/zstdruby/libzstd/README.md +76 -18
- data/ext/zstdruby/libzstd/common/bitstream.h +75 -57
- data/ext/zstdruby/libzstd/common/compiler.h +196 -20
- data/ext/zstdruby/libzstd/common/cpu.h +1 -3
- data/ext/zstdruby/libzstd/common/debug.c +11 -31
- data/ext/zstdruby/libzstd/common/debug.h +22 -49
- data/ext/zstdruby/libzstd/common/entropy_common.c +208 -76
- data/ext/zstdruby/libzstd/common/error_private.c +3 -1
- data/ext/zstdruby/libzstd/common/error_private.h +87 -4
- data/ext/zstdruby/libzstd/common/fse.h +51 -42
- data/ext/zstdruby/libzstd/common/fse_decompress.c +149 -57
- data/ext/zstdruby/libzstd/common/huf.h +60 -54
- data/ext/zstdruby/libzstd/common/mem.h +87 -98
- data/ext/zstdruby/libzstd/common/pool.c +23 -17
- data/ext/zstdruby/libzstd/common/pool.h +3 -3
- data/ext/zstdruby/libzstd/common/portability_macros.h +131 -0
- data/ext/zstdruby/libzstd/common/threading.c +10 -8
- data/ext/zstdruby/libzstd/common/threading.h +4 -3
- data/ext/zstdruby/libzstd/common/xxhash.c +15 -873
- data/ext/zstdruby/libzstd/common/xxhash.h +5572 -191
- data/ext/zstdruby/libzstd/common/zstd_common.c +10 -10
- data/ext/zstdruby/libzstd/common/zstd_deps.h +111 -0
- data/ext/zstdruby/libzstd/common/zstd_internal.h +252 -108
- data/ext/zstdruby/libzstd/common/zstd_trace.h +163 -0
- data/ext/zstdruby/libzstd/compress/clevels.h +134 -0
- data/ext/zstdruby/libzstd/compress/fse_compress.c +105 -85
- data/ext/zstdruby/libzstd/compress/hist.c +41 -63
- data/ext/zstdruby/libzstd/compress/hist.h +13 -33
- data/ext/zstdruby/libzstd/compress/huf_compress.c +831 -259
- data/ext/zstdruby/libzstd/compress/zstd_compress.c +3213 -1007
- data/ext/zstdruby/libzstd/compress/zstd_compress_internal.h +493 -71
- data/ext/zstdruby/libzstd/compress/zstd_compress_literals.c +21 -16
- data/ext/zstdruby/libzstd/compress/zstd_compress_literals.h +4 -2
- data/ext/zstdruby/libzstd/compress/zstd_compress_sequences.c +51 -24
- data/ext/zstdruby/libzstd/compress/zstd_compress_sequences.h +10 -3
- data/ext/zstdruby/libzstd/compress/zstd_compress_superblock.c +573 -0
- data/ext/zstdruby/libzstd/compress/zstd_compress_superblock.h +32 -0
- data/ext/zstdruby/libzstd/compress/zstd_cwksp.h +208 -81
- data/ext/zstdruby/libzstd/compress/zstd_double_fast.c +315 -137
- data/ext/zstdruby/libzstd/compress/zstd_double_fast.h +2 -2
- data/ext/zstdruby/libzstd/compress/zstd_fast.c +319 -128
- data/ext/zstdruby/libzstd/compress/zstd_fast.h +2 -2
- data/ext/zstdruby/libzstd/compress/zstd_lazy.c +1156 -171
- data/ext/zstdruby/libzstd/compress/zstd_lazy.h +59 -1
- data/ext/zstdruby/libzstd/compress/zstd_ldm.c +331 -206
- data/ext/zstdruby/libzstd/compress/zstd_ldm.h +15 -3
- data/ext/zstdruby/libzstd/compress/zstd_ldm_geartab.h +106 -0
- data/ext/zstdruby/libzstd/compress/zstd_opt.c +403 -226
- data/ext/zstdruby/libzstd/compress/zstd_opt.h +1 -1
- data/ext/zstdruby/libzstd/compress/zstdmt_compress.c +188 -453
- data/ext/zstdruby/libzstd/compress/zstdmt_compress.h +32 -114
- data/ext/zstdruby/libzstd/decompress/huf_decompress.c +1065 -410
- data/ext/zstdruby/libzstd/decompress/huf_decompress_amd64.S +571 -0
- data/ext/zstdruby/libzstd/decompress/zstd_ddict.c +20 -16
- data/ext/zstdruby/libzstd/decompress/zstd_ddict.h +3 -3
- data/ext/zstdruby/libzstd/decompress/zstd_decompress.c +691 -230
- data/ext/zstdruby/libzstd/decompress/zstd_decompress_block.c +1072 -323
- data/ext/zstdruby/libzstd/decompress/zstd_decompress_block.h +16 -7
- data/ext/zstdruby/libzstd/decompress/zstd_decompress_internal.h +71 -10
- data/ext/zstdruby/libzstd/deprecated/zbuff.h +3 -3
- data/ext/zstdruby/libzstd/deprecated/zbuff_common.c +2 -2
- data/ext/zstdruby/libzstd/deprecated/zbuff_compress.c +24 -4
- data/ext/zstdruby/libzstd/deprecated/zbuff_decompress.c +1 -1
- data/ext/zstdruby/libzstd/dictBuilder/cover.c +57 -40
- data/ext/zstdruby/libzstd/dictBuilder/cover.h +20 -9
- data/ext/zstdruby/libzstd/dictBuilder/divsufsort.c +1 -1
- data/ext/zstdruby/libzstd/dictBuilder/fastcover.c +54 -35
- data/ext/zstdruby/libzstd/dictBuilder/zdict.c +151 -57
- data/ext/zstdruby/libzstd/dll/example/Makefile +2 -1
- data/ext/zstdruby/libzstd/dll/example/README.md +16 -22
- data/ext/zstdruby/libzstd/legacy/zstd_legacy.h +4 -4
- data/ext/zstdruby/libzstd/legacy/zstd_v01.c +25 -19
- data/ext/zstdruby/libzstd/legacy/zstd_v01.h +1 -1
- data/ext/zstdruby/libzstd/legacy/zstd_v02.c +18 -14
- data/ext/zstdruby/libzstd/legacy/zstd_v02.h +1 -1
- data/ext/zstdruby/libzstd/legacy/zstd_v03.c +18 -14
- data/ext/zstdruby/libzstd/legacy/zstd_v03.h +1 -1
- data/ext/zstdruby/libzstd/legacy/zstd_v04.c +22 -16
- data/ext/zstdruby/libzstd/legacy/zstd_v04.h +1 -1
- data/ext/zstdruby/libzstd/legacy/zstd_v05.c +29 -25
- data/ext/zstdruby/libzstd/legacy/zstd_v05.h +2 -2
- data/ext/zstdruby/libzstd/legacy/zstd_v06.c +29 -25
- data/ext/zstdruby/libzstd/legacy/zstd_v06.h +1 -1
- data/ext/zstdruby/libzstd/legacy/zstd_v07.c +34 -26
- data/ext/zstdruby/libzstd/legacy/zstd_v07.h +1 -1
- data/ext/zstdruby/libzstd/libzstd.mk +185 -0
- data/ext/zstdruby/libzstd/libzstd.pc.in +4 -3
- data/ext/zstdruby/libzstd/modulemap/module.modulemap +4 -0
- data/ext/zstdruby/libzstd/{dictBuilder/zdict.h → zdict.h} +201 -31
- data/ext/zstdruby/libzstd/zstd.h +760 -234
- data/ext/zstdruby/libzstd/{common/zstd_errors.h → zstd_errors.h} +3 -1
- data/ext/zstdruby/zstdruby.c +2 -2
- data/lib/zstd-ruby/version.rb +1 -1
- metadata +20 -9
- data/.travis.yml +0 -14
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (c)
|
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
|
|
data/ext/zstdruby/zstdruby.c
CHANGED
@@ -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
|
-
|
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
|
-
|
84
|
+
StringValue(input);
|
85
85
|
const char* input_data = RSTRING_PTR(input);
|
86
86
|
size_t input_size = RSTRING_LEN(input);
|
87
87
|
|
data/lib/zstd-ruby/version.rb
CHANGED
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
|
+
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:
|
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/
|
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.
|
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: []
|