binaryparse 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/binaryparse.gemspec +18 -0
- data/doc/classes/BinaryBlocker/BitFieldEncoder.html +328 -0
- data/doc/classes/BinaryBlocker/Blocker.html +168 -0
- data/doc/classes/BinaryBlocker/CountedArrayEncoder.html +347 -0
- data/doc/classes/BinaryBlocker/Encoder.html +526 -0
- data/doc/classes/BinaryBlocker/FixedArrayEncoder.html +278 -0
- data/doc/classes/BinaryBlocker/FixedStringEncoder.html +177 -0
- data/doc/classes/BinaryBlocker/FixedUTF16StringEncoder.html +229 -0
- data/doc/classes/BinaryBlocker/GroupEncoder.html +650 -0
- data/doc/classes/BinaryBlocker/ListOfEncoder.html +343 -0
- data/doc/classes/BinaryBlocker/OneOfEncoder.html +306 -0
- data/doc/classes/BinaryBlocker/PackedDateEncoder.html +220 -0
- data/doc/classes/BinaryBlocker/PackedDateTimeEncoder.html +220 -0
- data/doc/classes/BinaryBlocker/PackedNumberEncoder.html +231 -0
- data/doc/classes/BinaryBlocker/SimpleEncoder.html +284 -0
- data/doc/classes/BinaryBlocker.html +329 -0
- data/doc/classes/BufferedIO.html +324 -0
- data/doc/classes/TestBlocker/BBDate.html +120 -0
- data/doc/classes/TestBlocker/BBList.html +120 -0
- data/doc/classes/TestBlocker/BBPacked.html +120 -0
- data/doc/classes/TestBlocker/BBString.html +120 -0
- data/doc/classes/TestBlocker/BBSub1.html +120 -0
- data/doc/classes/TestBlocker/BBSub2.html +120 -0
- data/doc/classes/TestBlocker/BBTest1.html +120 -0
- data/doc/classes/TestBlocker/BBTest2.html +120 -0
- data/doc/classes/TestBlocker/BBTest3.html +120 -0
- data/doc/classes/TestBlocker/BBTest4.html +120 -0
- data/doc/classes/TestBlocker/BBTest5.html +120 -0
- data/doc/classes/TestBlocker/BBTest6.html +120 -0
- data/doc/classes/TestBlocker/BBTest7.html +120 -0
- data/doc/classes/TestBlocker/BBTime.html +120 -0
- data/doc/classes/TestBlocker/BBUTF16.html +120 -0
- data/doc/classes/TestBlocker/ItemA.html +120 -0
- data/doc/classes/TestBlocker/ItemB.html +120 -0
- data/doc/classes/TestBlocker.html +802 -0
- data/doc/created.rid +1 -0
- data/doc/dot/f_0.dot +208 -0
- data/doc/dot/f_0.png +0 -0
- data/doc/dot/f_1.dot +23 -0
- data/doc/dot/f_1.png +0 -0
- data/doc/dot/f_2.dot +32 -0
- data/doc/dot/f_2.png +0 -0
- data/doc/dot/m_0_0.dot +208 -0
- data/doc/dot/m_0_0.png +0 -0
- data/doc/files/lib/blocker_rb.html +144 -0
- data/doc/files/lib/buffered_io_rb.html +115 -0
- data/doc/files/test/test_blocker_rb.html +116 -0
- data/doc/fr_class_index.html +60 -0
- data/doc/fr_file_index.html +29 -0
- data/doc/fr_method_index.html +135 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/blocker.rb +736 -0
- data/lib/buffered_io.rb +58 -0
- data/test/test_blocker.rb +412 -0
- metadata +111 -0
data/lib/buffered_io.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# Simple class to allow for streamed (i.e. without pos support)
|
2
|
+
# IO to use the BinaryBlocker utilities, but buffering until flushed
|
3
|
+
# previously read information.
|
4
|
+
class BufferedIO
|
5
|
+
BLOCK_SIZE = 512
|
6
|
+
# Rdoc
|
7
|
+
def initialize(io)
|
8
|
+
super
|
9
|
+
@io = io
|
10
|
+
@buffer = ''
|
11
|
+
@pos = 0
|
12
|
+
@iobase = @io.pos
|
13
|
+
end
|
14
|
+
|
15
|
+
def flush
|
16
|
+
@iobase += @pos
|
17
|
+
@buffer = ''
|
18
|
+
@pos = 0
|
19
|
+
@io.flush
|
20
|
+
end
|
21
|
+
|
22
|
+
def read(size, buffer = nil)
|
23
|
+
if (@buffer.size - @pos) < size
|
24
|
+
@buffer += @io.read(BLOCK_SIZE)
|
25
|
+
end
|
26
|
+
result = @buffer[@pos,size]
|
27
|
+
@pos += result.size
|
28
|
+
buffer.replace(result) if buffer
|
29
|
+
result
|
30
|
+
end
|
31
|
+
|
32
|
+
def pos
|
33
|
+
@iobase + @pos
|
34
|
+
end
|
35
|
+
|
36
|
+
def pos=(newpos)
|
37
|
+
seek(newpos)
|
38
|
+
end
|
39
|
+
|
40
|
+
def seek(amount, whence=IO::SEEK_SET)
|
41
|
+
case whence
|
42
|
+
when IO::SEEK_CUR
|
43
|
+
raise "rewind before buffer start" if (amount < @pos)
|
44
|
+
@pos -= amount
|
45
|
+
@iobase + @pos
|
46
|
+
|
47
|
+
when IO::SEEK_END
|
48
|
+
raise "Sorry this operation is not supported"
|
49
|
+
|
50
|
+
when IO::SEEK_SET
|
51
|
+
raise "rewind before buffer start" if (amount < @iobase)
|
52
|
+
@pos = amount - @iobase
|
53
|
+
@iobase + @pos
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
|
@@ -0,0 +1,412 @@
|
|
1
|
+
require 'blocker'
|
2
|
+
require 'stringio'
|
3
|
+
#require 'test/unit' #unless defined? $ZENTEST and $ZENTEST
|
4
|
+
|
5
|
+
class TestBlocker < Test::Unit::TestCase
|
6
|
+
class BBTest1 < BinaryBlocker::Blocker
|
7
|
+
has_one :foo, :int16
|
8
|
+
has_one :bar, :int32
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_usage
|
12
|
+
bb = BBTest1.new
|
13
|
+
bb.foo = 32
|
14
|
+
bb.bar = 24
|
15
|
+
|
16
|
+
assert_equal(32, bb.foo)
|
17
|
+
assert_equal(24, bb.bar)
|
18
|
+
end
|
19
|
+
|
20
|
+
class BBTest2 < BinaryBlocker::Blocker
|
21
|
+
has_one :foo, :int16, :key => 42
|
22
|
+
has_one :bar, :int32
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_simple_valid
|
26
|
+
bb = BBTest2.new
|
27
|
+
bb.foo = 32
|
28
|
+
bb.bar = 24
|
29
|
+
|
30
|
+
assert_equal(32, bb.foo)
|
31
|
+
assert_equal(24, bb.bar)
|
32
|
+
assert(!bb.valid?)
|
33
|
+
|
34
|
+
bb.foo = 42
|
35
|
+
assert(bb.valid?)
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_round_trip
|
39
|
+
bb = BBTest2.new
|
40
|
+
bb.foo = 42
|
41
|
+
bb.bar = 21
|
42
|
+
buf = bb.block
|
43
|
+
|
44
|
+
bb2 = BBTest2.new
|
45
|
+
bb2.deblock(StringIO.new(buf))
|
46
|
+
assert_equal(bb2.foo, 42)
|
47
|
+
assert_equal(bb2.bar, 21)
|
48
|
+
|
49
|
+
bb3 = BBTest2.new(StringIO.new(buf))
|
50
|
+
assert_equal(bb3.foo, 42)
|
51
|
+
assert_equal(bb3.bar, 21)
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_failed_deblock
|
55
|
+
bb = BBTest2.new
|
56
|
+
bb.foo = 43
|
57
|
+
bb.bar = 21
|
58
|
+
buf = bb.block
|
59
|
+
|
60
|
+
bb2 = BBTest2.new
|
61
|
+
status = bb2.deblock(StringIO.new(buf))
|
62
|
+
assert(!status)
|
63
|
+
|
64
|
+
assert_raises(RuntimeError) do
|
65
|
+
BBTest2.new(StringIO.new(buf))
|
66
|
+
end
|
67
|
+
|
68
|
+
bb.foo = 42
|
69
|
+
io = StringIO.new(bb.block)
|
70
|
+
assert(bb2.deblock(io))
|
71
|
+
|
72
|
+
assert_equal(bb2.foo, 42)
|
73
|
+
assert_equal(bb2.bar, 21)
|
74
|
+
assert_equal(6, io.pos)
|
75
|
+
end
|
76
|
+
|
77
|
+
class BBSub1 < BinaryBlocker::Blocker
|
78
|
+
has_one :foo, :int16, :key => 42
|
79
|
+
end
|
80
|
+
|
81
|
+
class BBSub2 < BinaryBlocker::Blocker
|
82
|
+
has_one :bar, :int16, :key => 21
|
83
|
+
end
|
84
|
+
|
85
|
+
class BBTest3 < BinaryBlocker::Blocker
|
86
|
+
has_one_of :foo, [BBSub1, BBSub2]
|
87
|
+
end
|
88
|
+
|
89
|
+
def test_has_one_of
|
90
|
+
bs1 = BBSub1.new
|
91
|
+
bs1.foo = 42
|
92
|
+
buf = bs1.block
|
93
|
+
bb = BBTest3.new(StringIO.new(buf))
|
94
|
+
assert(bb)
|
95
|
+
assert_equal(BBSub1, bb.foo.class)
|
96
|
+
assert_equal(42, bb.foo.foo)
|
97
|
+
|
98
|
+
bs2 = BBSub2.new
|
99
|
+
bs2.bar = 21
|
100
|
+
io = StringIO.new(bs2.block)
|
101
|
+
bb = BBTest3.new(io)
|
102
|
+
assert(bb)
|
103
|
+
assert_equal(BBSub2, bb.foo.class)
|
104
|
+
assert_equal(21, bb.foo.bar)
|
105
|
+
assert_equal(2, io.pos)
|
106
|
+
|
107
|
+
bb.foo = bs1
|
108
|
+
assert_equal(BBSub1, bb.foo.class)
|
109
|
+
assert_equal(42, bb.foo.foo)
|
110
|
+
|
111
|
+
buf = bb.block
|
112
|
+
bb = BBTest3.new(buf)
|
113
|
+
assert_equal(BBSub1, bb.foo.class)
|
114
|
+
assert_equal(42, bb.foo.foo)
|
115
|
+
end
|
116
|
+
|
117
|
+
class BBTest4 < BinaryBlocker::Blocker
|
118
|
+
has_fixed_array :fooboo, 3, [BBSub1, BBSub2]
|
119
|
+
end
|
120
|
+
|
121
|
+
def test_fixed_array
|
122
|
+
bs1 = BBSub1.new
|
123
|
+
bs1.foo = 42
|
124
|
+
bs2 = BBSub2.new
|
125
|
+
bs2.bar = 21
|
126
|
+
|
127
|
+
buf = bs1.block + bs2.block + bs1.block
|
128
|
+
bb = BBTest4.new(buf)
|
129
|
+
|
130
|
+
assert(bb)
|
131
|
+
assert(bb.fooboo)
|
132
|
+
assert(bb.fooboo[0].foo)
|
133
|
+
assert_equal(42, bb.fooboo[0].foo)
|
134
|
+
assert_equal(21, bb.fooboo[1].bar)
|
135
|
+
assert_equal(42, bb.fooboo[2].foo)
|
136
|
+
end
|
137
|
+
|
138
|
+
def test_building_fixed_array
|
139
|
+
fa = BBTest4.new
|
140
|
+
assert(fa)
|
141
|
+
fa.fooboo[0] = BBSub1.new
|
142
|
+
fa.fooboo[0].foo = 42
|
143
|
+
fa.fooboo[1] = BBSub2.new
|
144
|
+
fa.fooboo[1].bar = 21
|
145
|
+
fa.fooboo[2] = BBSub1.new
|
146
|
+
fa.fooboo[2].foo = 42
|
147
|
+
assert_equal(42, fa.fooboo[0].foo)
|
148
|
+
assert_equal(21, fa.fooboo[1].bar)
|
149
|
+
assert_equal(42, fa.fooboo[2].foo)
|
150
|
+
|
151
|
+
buf = fa.block
|
152
|
+
bb = BBTest4.new(buf)
|
153
|
+
assert(bb)
|
154
|
+
assert(bb.fooboo)
|
155
|
+
assert(bb.fooboo[0].foo)
|
156
|
+
assert_equal(42, bb.fooboo[0].foo)
|
157
|
+
assert_equal(21, bb.fooboo[1].bar)
|
158
|
+
assert_equal(42, bb.fooboo[2].foo)
|
159
|
+
|
160
|
+
assert_raises(RangeError) { bb.fooboo[-1] }
|
161
|
+
assert_raises(RangeError) { bb.fooboo[3] }
|
162
|
+
end
|
163
|
+
|
164
|
+
class BBTest5 < BinaryBlocker::Blocker
|
165
|
+
has_counted_array :fooboo, :int16, [BBSub1, BBSub2]
|
166
|
+
end
|
167
|
+
|
168
|
+
def test_counted_array
|
169
|
+
bb1 = BBSub1.new
|
170
|
+
bb1.foo = 42
|
171
|
+
bb2 = BBSub2.new
|
172
|
+
bb2.bar = 21
|
173
|
+
|
174
|
+
fa = BBTest5.new
|
175
|
+
assert(fa)
|
176
|
+
assert_equal(0, fa.fooboo.size)
|
177
|
+
|
178
|
+
fa.fooboo << bb1
|
179
|
+
assert_equal(1, fa.fooboo.size)
|
180
|
+
|
181
|
+
fa.fooboo << bb1
|
182
|
+
assert_equal(2, fa.fooboo.size)
|
183
|
+
|
184
|
+
fa.fooboo << bb1
|
185
|
+
assert_equal(3, fa.fooboo.size)
|
186
|
+
|
187
|
+
fa.fooboo << bb2
|
188
|
+
assert_equal(4, fa.fooboo.size)
|
189
|
+
|
190
|
+
fa.fooboo << bb1
|
191
|
+
assert_equal(5, fa.fooboo.size)
|
192
|
+
|
193
|
+
assert_raises(RangeError) { fa.fooboo[-1] }
|
194
|
+
assert_raises(RangeError) { fa.fooboo[5] }
|
195
|
+
assert(fa.fooboo[4])
|
196
|
+
end
|
197
|
+
|
198
|
+
class BBTest6 < BinaryBlocker::Blocker
|
199
|
+
has_one :a, BBTest1
|
200
|
+
has_one :bar, :int32
|
201
|
+
end
|
202
|
+
|
203
|
+
def test_composing
|
204
|
+
bb = BBTest6.new
|
205
|
+
assert(bb)
|
206
|
+
bb.a.foo = 1
|
207
|
+
assert_equal(1, bb.a.foo)
|
208
|
+
bb.a.bar = 2
|
209
|
+
assert_equal(2, bb.a.bar)
|
210
|
+
bb.bar = 1234
|
211
|
+
assert_equal(1234, bb.bar)
|
212
|
+
|
213
|
+
buf = bb.block
|
214
|
+
assert_equal(10, buf.size)
|
215
|
+
|
216
|
+
bb2 = BBTest6.new(buf)
|
217
|
+
assert(bb2)
|
218
|
+
assert_equal(1, bb2.a.foo)
|
219
|
+
assert_equal(2, bb2.a.bar)
|
220
|
+
assert_equal(1234, bb2.bar)
|
221
|
+
end
|
222
|
+
|
223
|
+
class BBTest7 < BinaryBlocker::Blocker
|
224
|
+
has_bit_field :a, :uint32, [:fld1, 2, [:fld2, 3]]
|
225
|
+
end
|
226
|
+
|
227
|
+
def test_bitfield
|
228
|
+
bb = BBTest7.new
|
229
|
+
assert(bb)
|
230
|
+
|
231
|
+
#assert(bb.a.fld1)
|
232
|
+
bb.a.fld2 = 1
|
233
|
+
assert_equal(8, bb.a.raw_value)
|
234
|
+
bb.a.fld2 = 2
|
235
|
+
assert_equal(16, bb.a.raw_value)
|
236
|
+
bb.a.fld1 = 1
|
237
|
+
assert_equal(17, bb.a.raw_value)
|
238
|
+
|
239
|
+
buf = bb.block
|
240
|
+
bb2 = BBTest7.new(buf)
|
241
|
+
assert_equal(17, bb.a.raw_value)
|
242
|
+
assert_equal(1, bb.a.fld1)
|
243
|
+
assert_equal(2, bb.a.fld2)
|
244
|
+
|
245
|
+
assert_raises(NoMethodError) { bb.a.fld12 }
|
246
|
+
end
|
247
|
+
|
248
|
+
class BBString < BinaryBlocker::Blocker
|
249
|
+
has_one :foo, :int16
|
250
|
+
has_one :name, :string, :length => 20
|
251
|
+
has_one :bar, :int32
|
252
|
+
end
|
253
|
+
|
254
|
+
def test_fixed_string
|
255
|
+
b = BBString.new
|
256
|
+
b.foo = 1
|
257
|
+
b.name = "Patrick "
|
258
|
+
b.bar = 42
|
259
|
+
|
260
|
+
assert_equal(1, b.foo)
|
261
|
+
assert_equal("Patrick ", b.name)
|
262
|
+
assert_equal(42, b.bar)
|
263
|
+
|
264
|
+
buf = b.block
|
265
|
+
assert_equal(2 + 20 + 4, buf.size)
|
266
|
+
|
267
|
+
b2 = BBString.new(buf)
|
268
|
+
assert_equal(1, b2.foo)
|
269
|
+
assert_equal("Patrick ", b2.name)
|
270
|
+
assert_equal(42, b2.bar)
|
271
|
+
end
|
272
|
+
|
273
|
+
class BBUTF16 < BinaryBlocker::Blocker
|
274
|
+
has_one :foo, :int16
|
275
|
+
has_one :name, :utf16, :length => 20
|
276
|
+
has_one :bar, :int32
|
277
|
+
end
|
278
|
+
|
279
|
+
def test_utf16
|
280
|
+
b = BBUTF16.new
|
281
|
+
b.foo = 1
|
282
|
+
b.name = "Patrick "
|
283
|
+
b.bar = 42
|
284
|
+
|
285
|
+
assert_equal(1, b.foo)
|
286
|
+
assert_equal("Patrick ", b.name)
|
287
|
+
assert_equal(42, b.bar)
|
288
|
+
|
289
|
+
buf = b.block
|
290
|
+
assert_equal(2 + 20 * 2 + 4, buf.size)
|
291
|
+
|
292
|
+
b2 = BBUTF16.new(buf)
|
293
|
+
assert_equal(1, b2.foo)
|
294
|
+
assert_equal("Patrick ", b2.name)
|
295
|
+
assert_equal(42, b2.bar)
|
296
|
+
end
|
297
|
+
|
298
|
+
class BBPacked < BinaryBlocker::Blocker
|
299
|
+
has_one :foo, :int16
|
300
|
+
has_one :age, :packed, :length => 3
|
301
|
+
has_one :bar, :int32
|
302
|
+
end
|
303
|
+
|
304
|
+
def test_packed_numbers
|
305
|
+
b = BBPacked.new
|
306
|
+
b.foo = 7
|
307
|
+
b.age = 32
|
308
|
+
b.bar = 3
|
309
|
+
|
310
|
+
assert_equal(7, b.foo)
|
311
|
+
assert_equal(32, b.age)
|
312
|
+
assert_equal(3, b.bar)
|
313
|
+
|
314
|
+
buf = b.block
|
315
|
+
assert_equal(2 + 2 + 4, buf.size)
|
316
|
+
|
317
|
+
b2 = BBPacked.new(buf)
|
318
|
+
assert_equal(7, b2.foo)
|
319
|
+
assert_equal(32, b2.age)
|
320
|
+
assert_equal(3, b2.bar)
|
321
|
+
end
|
322
|
+
|
323
|
+
class BBDate < BinaryBlocker::Blocker
|
324
|
+
has_one :today, :date
|
325
|
+
end
|
326
|
+
|
327
|
+
def test_packed_date
|
328
|
+
bdate = Date.civil(1967, 9, 30)
|
329
|
+
b = BBDate.new
|
330
|
+
b.today = bdate
|
331
|
+
|
332
|
+
buf = b.block
|
333
|
+
assert_equal(4, buf.size)
|
334
|
+
|
335
|
+
b2 = BBDate.new(buf)
|
336
|
+
assert_equal(bdate, b2.today)
|
337
|
+
end
|
338
|
+
|
339
|
+
class BBTime < BinaryBlocker::Blocker
|
340
|
+
has_one :now, :time
|
341
|
+
end
|
342
|
+
|
343
|
+
def test_packed_datetime
|
344
|
+
now = Time.local(1985, 5, 30, 7, 6, 5)
|
345
|
+
b = BBTime.new
|
346
|
+
b.now = now
|
347
|
+
|
348
|
+
buf = b.block
|
349
|
+
assert_equal(14 / 2, buf.size)
|
350
|
+
|
351
|
+
b2 = BBTime.new(buf)
|
352
|
+
assert_equal(now, b2.now)
|
353
|
+
end
|
354
|
+
|
355
|
+
class ItemA < BinaryBlocker::Blocker
|
356
|
+
has_one :iid, :int16, :key => 1
|
357
|
+
has_one :name, :string, :length => 32
|
358
|
+
end
|
359
|
+
|
360
|
+
class ItemB < BinaryBlocker::Blocker
|
361
|
+
has_one :iid, :int16, :key => 2
|
362
|
+
has_one :name, :string, :length => 32
|
363
|
+
end
|
364
|
+
|
365
|
+
class BBList < BinaryBlocker::Blocker
|
366
|
+
has_one :header, :int16
|
367
|
+
has_list_of :items, [ItemA, ItemB]
|
368
|
+
has_one :footer, :int16
|
369
|
+
end
|
370
|
+
|
371
|
+
def test_delimited_array
|
372
|
+
b = BBList.new
|
373
|
+
b.header = 19
|
374
|
+
b.footer = 67
|
375
|
+
|
376
|
+
ia = ItemA.new
|
377
|
+
ia.iid = 1
|
378
|
+
ia.name = 'widget A'
|
379
|
+
assert_equal(1, ia.iid)
|
380
|
+
|
381
|
+
ib = ItemB.new
|
382
|
+
ib.iid = 2
|
383
|
+
ib.name = 'widget B'
|
384
|
+
|
385
|
+
b.items << ia << ib << ia << ib << ib << ib
|
386
|
+
assert_equal(6, b.items.size)
|
387
|
+
|
388
|
+
buf = b.block
|
389
|
+
assert_equal(2 + (2 + 32) * 6 + 2, buf.size)
|
390
|
+
|
391
|
+
b2 = BBList.new(buf)
|
392
|
+
assert_equal(19, b2.header)
|
393
|
+
assert_equal(67, b2.footer)
|
394
|
+
|
395
|
+
assert_equal(6, b2.items.size)
|
396
|
+
|
397
|
+
assert_equal(b2.items[0].iid, ia.iid)
|
398
|
+
assert_equal(b2.items[1].iid, ib.iid)
|
399
|
+
assert_equal(b2.items[2].iid, ia.iid)
|
400
|
+
assert_equal(b2.items[3].iid, ib.iid)
|
401
|
+
assert_equal(b2.items[4].iid, ib.iid)
|
402
|
+
assert_equal(b2.items[5].iid, ib.iid)
|
403
|
+
|
404
|
+
assert_equal(b2.items[0].name, ia.name)
|
405
|
+
assert_equal(b2.items[1].name, ib.name)
|
406
|
+
assert_equal(b2.items[2].name, ia.name)
|
407
|
+
assert_equal(b2.items[3].name, ib.name)
|
408
|
+
assert_equal(b2.items[4].name, ib.name)
|
409
|
+
assert_equal(b2.items[5].name, ib.name)
|
410
|
+
end
|
411
|
+
end
|
412
|
+
|
metadata
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.9.0
|
3
|
+
specification_version: 1
|
4
|
+
name: binaryparse
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 0.1.0
|
7
|
+
date: 2006-08-08 00:00:00 -04:00
|
8
|
+
summary: Binaryparse is a simple Ruby DSL to parse semi-complicated binary structures. This includes structures dynamic in length, which cannot be handled by DL::Struct or BitStructEx.
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
email: phurley@gmail.com
|
12
|
+
homepage: http://binaryparse.rubyforge.org/
|
13
|
+
rubyforge_project:
|
14
|
+
description:
|
15
|
+
autorequire: binaryparse
|
16
|
+
default_executable:
|
17
|
+
bindir: bin
|
18
|
+
has_rdoc: false
|
19
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
24
|
+
version:
|
25
|
+
platform: ruby
|
26
|
+
signing_key:
|
27
|
+
cert_chain:
|
28
|
+
post_install_message:
|
29
|
+
authors:
|
30
|
+
- Patrick Hurley
|
31
|
+
files:
|
32
|
+
- binaryparse.gemspec
|
33
|
+
- doc
|
34
|
+
- examples
|
35
|
+
- lib
|
36
|
+
- test
|
37
|
+
- doc/classes
|
38
|
+
- doc/created.rid
|
39
|
+
- doc/dot
|
40
|
+
- doc/files
|
41
|
+
- doc/fr_class_index.html
|
42
|
+
- doc/fr_file_index.html
|
43
|
+
- doc/fr_method_index.html
|
44
|
+
- doc/index.html
|
45
|
+
- doc/rdoc-style.css
|
46
|
+
- doc/classes/BinaryBlocker
|
47
|
+
- doc/classes/BinaryBlocker.html
|
48
|
+
- doc/classes/BufferedIO.html
|
49
|
+
- doc/classes/TestBlocker
|
50
|
+
- doc/classes/TestBlocker.html
|
51
|
+
- doc/classes/BinaryBlocker/BitFieldEncoder.html
|
52
|
+
- doc/classes/BinaryBlocker/Blocker.html
|
53
|
+
- doc/classes/BinaryBlocker/CountedArrayEncoder.html
|
54
|
+
- doc/classes/BinaryBlocker/Encoder.html
|
55
|
+
- doc/classes/BinaryBlocker/FixedArrayEncoder.html
|
56
|
+
- doc/classes/BinaryBlocker/FixedStringEncoder.html
|
57
|
+
- doc/classes/BinaryBlocker/FixedUTF16StringEncoder.html
|
58
|
+
- doc/classes/BinaryBlocker/GroupEncoder.html
|
59
|
+
- doc/classes/BinaryBlocker/ListOfEncoder.html
|
60
|
+
- doc/classes/BinaryBlocker/OneOfEncoder.html
|
61
|
+
- doc/classes/BinaryBlocker/PackedDateEncoder.html
|
62
|
+
- doc/classes/BinaryBlocker/PackedDateTimeEncoder.html
|
63
|
+
- doc/classes/BinaryBlocker/PackedNumberEncoder.html
|
64
|
+
- doc/classes/BinaryBlocker/SimpleEncoder.html
|
65
|
+
- doc/classes/TestBlocker/BBDate.html
|
66
|
+
- doc/classes/TestBlocker/BBList.html
|
67
|
+
- doc/classes/TestBlocker/BBPacked.html
|
68
|
+
- doc/classes/TestBlocker/BBString.html
|
69
|
+
- doc/classes/TestBlocker/BBSub1.html
|
70
|
+
- doc/classes/TestBlocker/BBSub2.html
|
71
|
+
- doc/classes/TestBlocker/BBTest1.html
|
72
|
+
- doc/classes/TestBlocker/BBTest2.html
|
73
|
+
- doc/classes/TestBlocker/BBTest3.html
|
74
|
+
- doc/classes/TestBlocker/BBTest4.html
|
75
|
+
- doc/classes/TestBlocker/BBTest5.html
|
76
|
+
- doc/classes/TestBlocker/BBTest6.html
|
77
|
+
- doc/classes/TestBlocker/BBTest7.html
|
78
|
+
- doc/classes/TestBlocker/BBTime.html
|
79
|
+
- doc/classes/TestBlocker/BBUTF16.html
|
80
|
+
- doc/classes/TestBlocker/ItemA.html
|
81
|
+
- doc/classes/TestBlocker/ItemB.html
|
82
|
+
- doc/dot/f_0.dot
|
83
|
+
- doc/dot/f_0.png
|
84
|
+
- doc/dot/f_1.dot
|
85
|
+
- doc/dot/f_1.png
|
86
|
+
- doc/dot/f_2.dot
|
87
|
+
- doc/dot/f_2.png
|
88
|
+
- doc/dot/m_0_0.dot
|
89
|
+
- doc/dot/m_0_0.png
|
90
|
+
- doc/files/lib
|
91
|
+
- doc/files/test
|
92
|
+
- doc/files/lib/blocker_rb.html
|
93
|
+
- doc/files/lib/buffered_io_rb.html
|
94
|
+
- doc/files/test/test_blocker_rb.html
|
95
|
+
- lib/blocker.rb
|
96
|
+
- lib/buffered_io.rb
|
97
|
+
- test/test_blocker.rb
|
98
|
+
test_files: []
|
99
|
+
|
100
|
+
rdoc_options: []
|
101
|
+
|
102
|
+
extra_rdoc_files: []
|
103
|
+
|
104
|
+
executables: []
|
105
|
+
|
106
|
+
extensions: []
|
107
|
+
|
108
|
+
requirements: []
|
109
|
+
|
110
|
+
dependencies: []
|
111
|
+
|