ruby-bzs 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,22 @@
1
+ # Ruby bindings for bzip2 library.
2
+ # Copyright (c) 2022 AUTHORS, MIT License.
3
+
4
+ require "adsp/stream/raw/decompressor"
5
+ require "bzs_ext"
6
+
7
+ require_relative "../../option"
8
+
9
+ module BZS
10
+ module Stream
11
+ module Raw
12
+ # BZS::Stream::Raw::Decompressor class.
13
+ class Decompressor < ADSP::Stream::Raw::Decompressor
14
+ # Current native decompressor class.
15
+ NativeDecompressor = Stream::NativeDecompressor
16
+
17
+ # Current option class.
18
+ Option = BZS::Option
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,16 @@
1
+ # Ruby bindings for bzip2 library.
2
+ # Copyright (c) 2022 AUTHORS, MIT License.
3
+
4
+ require "adsp/stream/reader"
5
+
6
+ require_relative "raw/decompressor"
7
+
8
+ module BZS
9
+ module Stream
10
+ # BZS::Stream::Reader class.
11
+ class Reader < ADSP::Stream::Reader
12
+ # Current raw stream class.
13
+ RawDecompressor = Raw::Decompressor
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # Ruby bindings for bzip2 library.
2
+ # Copyright (c) 2022 AUTHORS, MIT License.
3
+
4
+ require "adsp/stream/writer"
5
+
6
+ require_relative "raw/compressor"
7
+
8
+ module BZS
9
+ module Stream
10
+ # BZS::Stream::Writer class.
11
+ class Writer < ADSP::Stream::Writer
12
+ # Current raw stream class.
13
+ RawCompressor = Raw::Compressor
14
+ end
15
+ end
16
+ end
data/lib/bzs/string.rb ADDED
@@ -0,0 +1,25 @@
1
+ # Ruby bindings for bzip2 library.
2
+ # Copyright (c) 2022 AUTHORS, MIT License.
3
+
4
+ require "adsp/string"
5
+ require "bzs_ext"
6
+
7
+ require_relative "option"
8
+
9
+ module BZS
10
+ # BZS::String class.
11
+ class String < ADSP::String
12
+ # Current option class.
13
+ Option = BZS::Option
14
+
15
+ # Bypasses native compress.
16
+ def self.native_compress_string(*args)
17
+ BZS._native_compress_string(*args)
18
+ end
19
+
20
+ # Bypasses native decompress.
21
+ def self.native_decompress_string(*args)
22
+ BZS._native_decompress_string(*args)
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,14 @@
1
+ # Ruby bindings for bzip2 library.
2
+ # Copyright (c) 2022 AUTHORS, MIT License.
3
+
4
+ require "adsp/validation"
5
+
6
+ module BZS
7
+ # BZS::Validation class.
8
+ class Validation < ADSP::Validation
9
+ # Raises error when +value+ is not boolean.
10
+ def self.validate_bool(value)
11
+ raise ValidateError, "invalid bool" unless value.is_a?(::TrueClass) || value.is_a?(::FalseClass)
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,6 @@
1
+ # Ruby bindings for bzip2 library.
2
+ # Copyright (c) 2022 AUTHORS, MIT License.
3
+
4
+ module BZS
5
+ VERSION = "1.0.0".freeze
6
+ end
data/lib/bzs.rb ADDED
@@ -0,0 +1,8 @@
1
+ # Ruby bindings for bzip2 library.
2
+ # Copyright (c) 2022 AUTHORS, MIT License.
3
+
4
+ # require_relative "bzs/stream/reader"
5
+ # require_relative "bzs/stream/writer"
6
+ # require_relative "bzs/file"
7
+ require_relative "bzs/string"
8
+ require_relative "bzs/version"
metadata ADDED
@@ -0,0 +1,289 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-bzs
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Andrew Aladjev
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-07-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: adsp
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: codecov
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'
41
+ - !ruby/object:Gem::Dependency
42
+ name: json
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitar
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.9'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.9'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '5.16'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '5.16'
83
+ - !ruby/object:Gem::Dependency
84
+ name: ocg
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.4'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.4'
97
+ - !ruby/object:Gem::Dependency
98
+ name: parallel
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rake-compiler
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rdoc
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rubocop
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '1.31'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '1.31'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rubocop-minitest
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '0.20'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '0.20'
181
+ - !ruby/object:Gem::Dependency
182
+ name: rubocop-performance
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '1.14'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '1.14'
195
+ - !ruby/object:Gem::Dependency
196
+ name: rubocop-rake
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '0.6'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '0.6'
209
+ - !ruby/object:Gem::Dependency
210
+ name: simplecov
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ description:
224
+ email: aladjev.andrew@gmail.com
225
+ executables: []
226
+ extensions:
227
+ - ext/extconf.rb
228
+ extra_rdoc_files: []
229
+ files:
230
+ - AUTHORS
231
+ - LICENSE
232
+ - README.md
233
+ - ext/bzs_ext/buffer.c
234
+ - ext/bzs_ext/buffer.h
235
+ - ext/bzs_ext/common.h
236
+ - ext/bzs_ext/error.c
237
+ - ext/bzs_ext/error.h
238
+ - ext/bzs_ext/gvl.h
239
+ - ext/bzs_ext/io.c
240
+ - ext/bzs_ext/io.h
241
+ - ext/bzs_ext/macro.h
242
+ - ext/bzs_ext/main.c
243
+ - ext/bzs_ext/option.c
244
+ - ext/bzs_ext/option.h
245
+ - ext/bzs_ext/stream/compressor.c
246
+ - ext/bzs_ext/stream/compressor.h
247
+ - ext/bzs_ext/stream/decompressor.c
248
+ - ext/bzs_ext/stream/decompressor.h
249
+ - ext/bzs_ext/string.c
250
+ - ext/bzs_ext/string.h
251
+ - ext/bzs_ext/utils.c
252
+ - ext/bzs_ext/utils.h
253
+ - ext/extconf.rb
254
+ - lib/bzs.rb
255
+ - lib/bzs/error.rb
256
+ - lib/bzs/file.rb
257
+ - lib/bzs/option.rb
258
+ - lib/bzs/stream/raw/compressor.rb
259
+ - lib/bzs/stream/raw/decompressor.rb
260
+ - lib/bzs/stream/reader.rb
261
+ - lib/bzs/stream/writer.rb
262
+ - lib/bzs/string.rb
263
+ - lib/bzs/validation.rb
264
+ - lib/bzs/version.rb
265
+ homepage: https://github.com/andrew-aladev/ruby-bzs
266
+ licenses:
267
+ - MIT
268
+ metadata:
269
+ rubygems_mfa_required: 'true'
270
+ post_install_message:
271
+ rdoc_options: []
272
+ require_paths:
273
+ - lib
274
+ required_ruby_version: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - ">="
277
+ - !ruby/object:Gem::Version
278
+ version: '2.6'
279
+ required_rubygems_version: !ruby/object:Gem::Requirement
280
+ requirements:
281
+ - - ">="
282
+ - !ruby/object:Gem::Version
283
+ version: '0'
284
+ requirements: []
285
+ rubygems_version: 3.3.7
286
+ signing_key:
287
+ specification_version: 4
288
+ summary: Ruby bindings for bzip2 library.
289
+ test_files: []