ruby-zstds 1.0.3 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +133 -170
- data/ext/extconf.rb +13 -1
- data/ext/zstds_ext/buffer.c +4 -3
- data/ext/zstds_ext/buffer.h +5 -5
- data/ext/zstds_ext/dictionary.c +104 -42
- data/ext/zstds_ext/dictionary.h +1 -1
- data/ext/zstds_ext/error.c +12 -12
- data/ext/zstds_ext/error.h +2 -1
- data/ext/zstds_ext/gvl.h +24 -0
- data/ext/zstds_ext/io.c +229 -137
- data/ext/zstds_ext/option.c +44 -43
- data/ext/zstds_ext/option.h +62 -51
- data/ext/zstds_ext/stream/compressor.c +103 -50
- data/ext/zstds_ext/stream/compressor.h +4 -1
- data/ext/zstds_ext/stream/decompressor.c +46 -22
- data/ext/zstds_ext/stream/decompressor.h +4 -1
- data/ext/zstds_ext/string.c +93 -62
- data/lib/zstds/dictionary.rb +2 -0
- data/lib/zstds/file.rb +6 -2
- data/lib/zstds/option.rb +18 -7
- data/lib/zstds/stream/abstract.rb +6 -9
- data/lib/zstds/stream/raw/abstract.rb +6 -2
- data/lib/zstds/stream/raw/compressor.rb +3 -7
- data/lib/zstds/stream/raw/decompressor.rb +1 -5
- data/lib/zstds/stream/reader.rb +72 -52
- data/lib/zstds/stream/reader_helpers.rb +1 -1
- data/lib/zstds/stream/writer.rb +9 -4
- data/lib/zstds/stream/writer_helpers.rb +3 -2
- data/lib/zstds/validation.rb +4 -2
- data/lib/zstds/version.rb +1 -1
- metadata +62 -19
@@ -31,9 +31,10 @@ module ZSTDS
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def putc(object, encoding: ::Encoding::BINARY)
|
34
|
-
|
34
|
+
case object
|
35
|
+
when ::Numeric
|
35
36
|
write object.chr(encoding)
|
36
|
-
|
37
|
+
when ::String
|
37
38
|
write object[0]
|
38
39
|
else
|
39
40
|
raise ValidateError, "invalid object: \"#{object}\" for putc"
|
data/lib/zstds/validation.rb
CHANGED
@@ -27,7 +27,7 @@ module ZSTDS
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def self.validate_positive_integer(value)
|
30
|
-
raise ValidateError, "invalid positive integer" unless value.is_a?(::Integer) && value
|
30
|
+
raise ValidateError, "invalid positive integer" unless value.is_a?(::Integer) && value.positive?
|
31
31
|
end
|
32
32
|
|
33
33
|
def self.validate_not_negative_integer(value)
|
@@ -55,7 +55,9 @@ module ZSTDS
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def self.validate_proc(value)
|
58
|
-
|
58
|
+
unless value.is_a?(::Proc) || value.is_a?(::Method) || value.is_a?(::UnboundMethod)
|
59
|
+
raise ValidateError, "invalid proc"
|
60
|
+
end
|
59
61
|
end
|
60
62
|
end
|
61
63
|
end
|
data/lib/zstds/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-zstds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Aladjev
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: codecov
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: minitar
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,28 +58,42 @@ dependencies:
|
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '5.
|
61
|
+
version: '5.14'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '5.
|
68
|
+
version: '5.14'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: ocg
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
75
|
+
version: '1.3'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
82
|
+
version: '1.3'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: parallel
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rake
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,42 +128,56 @@ dependencies:
|
|
100
128
|
requirements:
|
101
129
|
- - "~>"
|
102
130
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
131
|
+
version: '1.16'
|
104
132
|
type: :development
|
105
133
|
prerelease: false
|
106
134
|
version_requirements: !ruby/object:Gem::Requirement
|
107
135
|
requirements:
|
108
136
|
- - "~>"
|
109
137
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
138
|
+
version: '1.16'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop-minitest
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.12'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.12'
|
111
153
|
- !ruby/object:Gem::Dependency
|
112
154
|
name: rubocop-performance
|
113
155
|
requirement: !ruby/object:Gem::Requirement
|
114
156
|
requirements:
|
115
157
|
- - "~>"
|
116
158
|
- !ruby/object:Gem::Version
|
117
|
-
version: '1.
|
159
|
+
version: '1.11'
|
118
160
|
type: :development
|
119
161
|
prerelease: false
|
120
162
|
version_requirements: !ruby/object:Gem::Requirement
|
121
163
|
requirements:
|
122
164
|
- - "~>"
|
123
165
|
- !ruby/object:Gem::Version
|
124
|
-
version: '1.
|
166
|
+
version: '1.11'
|
125
167
|
- !ruby/object:Gem::Dependency
|
126
|
-
name: rubocop-
|
168
|
+
name: rubocop-rake
|
127
169
|
requirement: !ruby/object:Gem::Requirement
|
128
170
|
requirements:
|
129
171
|
- - "~>"
|
130
172
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
173
|
+
version: '0.5'
|
132
174
|
type: :development
|
133
175
|
prerelease: false
|
134
176
|
version_requirements: !ruby/object:Gem::Requirement
|
135
177
|
requirements:
|
136
178
|
- - "~>"
|
137
179
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
180
|
+
version: '0.5'
|
139
181
|
- !ruby/object:Gem::Dependency
|
140
182
|
name: simplecov
|
141
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,7 +192,7 @@ dependencies:
|
|
150
192
|
- - ">="
|
151
193
|
- !ruby/object:Gem::Version
|
152
194
|
version: '0'
|
153
|
-
description:
|
195
|
+
description:
|
154
196
|
email: aladjev.andrew@gmail.com
|
155
197
|
executables: []
|
156
198
|
extensions:
|
@@ -168,6 +210,7 @@ files:
|
|
168
210
|
- ext/zstds_ext/dictionary.h
|
169
211
|
- ext/zstds_ext/error.c
|
170
212
|
- ext/zstds_ext/error.h
|
213
|
+
- ext/zstds_ext/gvl.h
|
171
214
|
- ext/zstds_ext/io.c
|
172
215
|
- ext/zstds_ext/io.h
|
173
216
|
- ext/zstds_ext/macro.h
|
@@ -202,7 +245,7 @@ homepage: https://github.com/andrew-aladev/ruby-zstds
|
|
202
245
|
licenses:
|
203
246
|
- MIT
|
204
247
|
metadata: {}
|
205
|
-
post_install_message:
|
248
|
+
post_install_message:
|
206
249
|
rdoc_options: []
|
207
250
|
require_paths:
|
208
251
|
- lib
|
@@ -210,15 +253,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
210
253
|
requirements:
|
211
254
|
- - ">="
|
212
255
|
- !ruby/object:Gem::Version
|
213
|
-
version: '
|
256
|
+
version: '2.5'
|
214
257
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
258
|
requirements:
|
216
259
|
- - ">="
|
217
260
|
- !ruby/object:Gem::Version
|
218
261
|
version: '0'
|
219
262
|
requirements: []
|
220
|
-
rubygems_version: 3.
|
221
|
-
signing_key:
|
263
|
+
rubygems_version: 3.2.15
|
264
|
+
signing_key:
|
222
265
|
specification_version: 4
|
223
266
|
summary: Ruby bindings for zstd library.
|
224
267
|
test_files: []
|