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.
- 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 +2 -1
- data/ext/zstdruby/libzstd/BUCK +5 -7
- data/ext/zstdruby/libzstd/Makefile +225 -222
- data/ext/zstdruby/libzstd/README.md +43 -5
- data/ext/zstdruby/libzstd/common/bitstream.h +46 -22
- data/ext/zstdruby/libzstd/common/compiler.h +182 -22
- data/ext/zstdruby/libzstd/common/cpu.h +1 -3
- data/ext/zstdruby/libzstd/common/debug.c +1 -1
- data/ext/zstdruby/libzstd/common/debug.h +12 -19
- data/ext/zstdruby/libzstd/common/entropy_common.c +196 -44
- data/ext/zstdruby/libzstd/common/error_private.c +2 -1
- data/ext/zstdruby/libzstd/common/error_private.h +82 -3
- data/ext/zstdruby/libzstd/common/fse.h +41 -12
- data/ext/zstdruby/libzstd/common/fse_decompress.c +139 -22
- data/ext/zstdruby/libzstd/common/huf.h +47 -23
- 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 +2 -2
- data/ext/zstdruby/libzstd/common/portability_macros.h +131 -0
- data/ext/zstdruby/libzstd/common/threading.c +6 -5
- data/ext/zstdruby/libzstd/common/xxhash.c +6 -846
- data/ext/zstdruby/libzstd/common/xxhash.h +5568 -167
- 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 +189 -142
- 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 +89 -46
- data/ext/zstdruby/libzstd/compress/hist.c +27 -29
- data/ext/zstdruby/libzstd/compress/hist.h +2 -2
- data/ext/zstdruby/libzstd/compress/huf_compress.c +770 -198
- data/ext/zstdruby/libzstd/compress/zstd_compress.c +2894 -863
- data/ext/zstdruby/libzstd/compress/zstd_compress_internal.h +390 -90
- data/ext/zstdruby/libzstd/compress/zstd_compress_literals.c +12 -11
- data/ext/zstdruby/libzstd/compress/zstd_compress_literals.h +4 -2
- data/ext/zstdruby/libzstd/compress/zstd_compress_sequences.c +31 -8
- data/ext/zstdruby/libzstd/compress/zstd_compress_sequences.h +1 -1
- data/ext/zstdruby/libzstd/compress/zstd_compress_superblock.c +25 -297
- data/ext/zstdruby/libzstd/compress/zstd_compress_superblock.h +1 -1
- data/ext/zstdruby/libzstd/compress/zstd_cwksp.h +206 -69
- data/ext/zstdruby/libzstd/compress/zstd_double_fast.c +307 -132
- data/ext/zstdruby/libzstd/compress/zstd_double_fast.h +1 -1
- data/ext/zstdruby/libzstd/compress/zstd_fast.c +322 -143
- data/ext/zstdruby/libzstd/compress/zstd_fast.h +1 -1
- data/ext/zstdruby/libzstd/compress/zstd_lazy.c +1136 -174
- data/ext/zstdruby/libzstd/compress/zstd_lazy.h +59 -1
- data/ext/zstdruby/libzstd/compress/zstd_ldm.c +316 -213
- data/ext/zstdruby/libzstd/compress/zstd_ldm.h +9 -2
- data/ext/zstdruby/libzstd/compress/zstd_ldm_geartab.h +106 -0
- data/ext/zstdruby/libzstd/compress/zstd_opt.c +373 -150
- data/ext/zstdruby/libzstd/compress/zstd_opt.h +1 -1
- data/ext/zstdruby/libzstd/compress/zstdmt_compress.c +152 -444
- data/ext/zstdruby/libzstd/compress/zstdmt_compress.h +31 -113
- data/ext/zstdruby/libzstd/decompress/huf_decompress.c +1044 -403
- data/ext/zstdruby/libzstd/decompress/huf_decompress_amd64.S +571 -0
- data/ext/zstdruby/libzstd/decompress/zstd_ddict.c +9 -9
- data/ext/zstdruby/libzstd/decompress/zstd_ddict.h +2 -2
- data/ext/zstdruby/libzstd/decompress/zstd_decompress.c +450 -105
- data/ext/zstdruby/libzstd/decompress/zstd_decompress_block.c +913 -273
- data/ext/zstdruby/libzstd/decompress/zstd_decompress_block.h +14 -5
- data/ext/zstdruby/libzstd/decompress/zstd_decompress_internal.h +59 -12
- data/ext/zstdruby/libzstd/deprecated/zbuff.h +1 -1
- data/ext/zstdruby/libzstd/deprecated/zbuff_common.c +1 -1
- 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 +55 -38
- data/ext/zstdruby/libzstd/dictBuilder/cover.h +7 -6
- data/ext/zstdruby/libzstd/dictBuilder/divsufsort.c +1 -1
- data/ext/zstdruby/libzstd/dictBuilder/fastcover.c +43 -34
- data/ext/zstdruby/libzstd/dictBuilder/zdict.c +128 -58
- data/ext/zstdruby/libzstd/dll/example/Makefile +1 -1
- data/ext/zstdruby/libzstd/dll/example/README.md +16 -22
- data/ext/zstdruby/libzstd/legacy/zstd_legacy.h +1 -1
- data/ext/zstdruby/libzstd/legacy/zstd_v01.c +8 -8
- data/ext/zstdruby/libzstd/legacy/zstd_v01.h +1 -1
- data/ext/zstdruby/libzstd/legacy/zstd_v02.c +9 -9
- data/ext/zstdruby/libzstd/legacy/zstd_v02.h +1 -1
- data/ext/zstdruby/libzstd/legacy/zstd_v03.c +9 -9
- data/ext/zstdruby/libzstd/legacy/zstd_v03.h +1 -1
- data/ext/zstdruby/libzstd/legacy/zstd_v04.c +10 -10
- data/ext/zstdruby/libzstd/legacy/zstd_v04.h +1 -1
- data/ext/zstdruby/libzstd/legacy/zstd_v05.c +13 -13
- data/ext/zstdruby/libzstd/legacy/zstd_v05.h +1 -1
- data/ext/zstdruby/libzstd/legacy/zstd_v06.c +13 -13
- data/ext/zstdruby/libzstd/legacy/zstd_v06.h +1 -1
- data/ext/zstdruby/libzstd/legacy/zstd_v07.c +13 -13
- 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} +154 -7
- data/ext/zstdruby/libzstd/zstd.h +699 -214
- data/ext/zstdruby/libzstd/{common/zstd_errors.h → zstd_errors.h} +2 -1
- data/ext/zstdruby/zstdruby.c +2 -2
- data/lib/zstd-ruby/version.rb +1 -1
- metadata +15 -6
- 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
|
@@ -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
|
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SpringMT
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
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/
|
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.
|
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)
|