binaryparse 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/binaryparse.gemspec +17 -17
- data/examples/pms_input_2_test.rb +70 -0
- data/lib/blocker.rb +1 -1
- metadata +3 -66
- data/doc/binaryparse.chm +0 -0
- data/doc/bphelp.zip +0 -0
- data/doc/classes/BinaryBlocker/BitFieldEncoder.html +0 -328
- data/doc/classes/BinaryBlocker/Blocker.html +0 -168
- data/doc/classes/BinaryBlocker/CountedArrayEncoder.html +0 -347
- data/doc/classes/BinaryBlocker/Encoder.html +0 -526
- data/doc/classes/BinaryBlocker/FixedArrayEncoder.html +0 -278
- data/doc/classes/BinaryBlocker/FixedStringEncoder.html +0 -177
- data/doc/classes/BinaryBlocker/FixedUTF16StringEncoder.html +0 -229
- data/doc/classes/BinaryBlocker/GroupEncoder.html +0 -650
- data/doc/classes/BinaryBlocker/ListOfEncoder.html +0 -343
- data/doc/classes/BinaryBlocker/OneOfEncoder.html +0 -306
- data/doc/classes/BinaryBlocker/PackedDateEncoder.html +0 -220
- data/doc/classes/BinaryBlocker/PackedDateTimeEncoder.html +0 -220
- data/doc/classes/BinaryBlocker/PackedNumberEncoder.html +0 -231
- data/doc/classes/BinaryBlocker/SimpleEncoder.html +0 -284
- data/doc/classes/BinaryBlocker.html +0 -329
- data/doc/classes/BufferedIO.html +0 -324
- data/doc/classes/TestBlocker/BBDate.html +0 -120
- data/doc/classes/TestBlocker/BBList.html +0 -120
- data/doc/classes/TestBlocker/BBPacked.html +0 -120
- data/doc/classes/TestBlocker/BBString.html +0 -120
- data/doc/classes/TestBlocker/BBSub1.html +0 -120
- data/doc/classes/TestBlocker/BBSub2.html +0 -120
- data/doc/classes/TestBlocker/BBTest1.html +0 -120
- data/doc/classes/TestBlocker/BBTest2.html +0 -120
- data/doc/classes/TestBlocker/BBTest3.html +0 -120
- data/doc/classes/TestBlocker/BBTest4.html +0 -120
- data/doc/classes/TestBlocker/BBTest5.html +0 -120
- data/doc/classes/TestBlocker/BBTest6.html +0 -120
- data/doc/classes/TestBlocker/BBTest7.html +0 -120
- data/doc/classes/TestBlocker/BBTime.html +0 -120
- data/doc/classes/TestBlocker/BBUTF16.html +0 -120
- data/doc/classes/TestBlocker/ItemA.html +0 -120
- data/doc/classes/TestBlocker/ItemB.html +0 -120
- data/doc/classes/TestBlocker.html +0 -802
- data/doc/contents.hhc +0 -670
- data/doc/created.rid +0 -1
- data/doc/dot/f_0.dot +0 -208
- data/doc/dot/f_0.png +0 -0
- data/doc/dot/f_1.dot +0 -23
- data/doc/dot/f_1.png +0 -0
- data/doc/dot/f_2.dot +0 -32
- data/doc/dot/f_2.png +0 -0
- data/doc/dot/m_0_0.dot +0 -208
- data/doc/dot/m_0_0.png +0 -0
- data/doc/files/lib/blocker_rb.html +0 -144
- data/doc/files/lib/buffered_io_rb.html +0 -115
- data/doc/files/test/test_blocker_rb.html +0 -116
- data/doc/fr_class_index.html +0 -60
- data/doc/fr_file_index.html +0 -29
- data/doc/fr_method_index.html +0 -135
- data/doc/index.hhk +0 -599
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
- data/doc/rdoc.hhp +0 -15
@@ -1,168 +0,0 @@
|
|
1
|
-
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: BinaryBlocker::Blocker</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">BinaryBlocker::Blocker</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/blocker_rb.html">
|
59
|
-
lib/blocker.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="GroupEncoder.html">
|
69
|
-
GroupEncoder
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
<div id="diagram">
|
83
|
-
<map id="map" name="map">
|
84
|
-
<area shape="rect" coords="252,146,351,194" href="GroupEncoder.html" alt="GroupEncoder" />
|
85
|
-
<area shape="rect" coords="27,242,123,290" href="ListOfEncoder.html" alt="ListOfEncoder" />
|
86
|
-
<area shape="rect" coords="147,242,219,290" href="Blocker.html" alt="Blocker" />
|
87
|
-
<area shape="rect" coords="243,242,360,290" href="FixedArrayEncoder.html" alt="FixedArrayEncoder" />
|
88
|
-
<area shape="rect" coords="384,242,517,290" href="CountedArrayEncoder.html" alt="CountedArrayEncoder" />
|
89
|
-
<area shape="rect" coords="683,50,755,98" href="Encoder.html" alt="Encoder" />
|
90
|
-
<area shape="rect" coords="605,146,707,194" href="SimpleEncoder.html" alt="SimpleEncoder" />
|
91
|
-
<area shape="rect" coords="731,146,835,194" href="BitFieldEncoder.html" alt="BitFieldEncoder" />
|
92
|
-
<area shape="rect" coords="859,146,960,194" href="OneOfEncoder.html" alt="OneOfEncoder" />
|
93
|
-
<area shape="rect" coords="541,242,683,290" href="PackedNumberEncoder.html" alt="PackedNumberEncoder" />
|
94
|
-
<area shape="rect" coords="469,338,595,386" href="PackedDateEncoder.html" alt="PackedDateEncoder" />
|
95
|
-
<area shape="rect" coords="619,338,765,386" href="PackedDateTimeEncoder.html" alt="PackedDateTimeEncoder" />
|
96
|
-
<area shape="rect" coords="707,242,827,290" href="FixedStringEncoder.html" alt="FixedStringEncoder" />
|
97
|
-
<area shape="rect" coords="851,242,1005,290" href="FixedUTF16StringEncoder.html" alt="FixedUTF16StringEncoder" />
|
98
|
-
<area shape="rect" coords="16,16,1016,396" href="../BinaryBlocker.html" alt="BinaryBlocker" />
|
99
|
-
</map>
|
100
|
-
<img src="../../dot/m_0_0.png" usemap="#map" border="0" alt="Module: BinaryBlocker" />
|
101
|
-
</div>
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
</div>
|
106
|
-
|
107
|
-
<div id="method-list">
|
108
|
-
<h3 class="section-bar">Methods</h3>
|
109
|
-
|
110
|
-
<div class="name-list">
|
111
|
-
<a href="#M000055">inspect</a>
|
112
|
-
</div>
|
113
|
-
</div>
|
114
|
-
|
115
|
-
</div>
|
116
|
-
|
117
|
-
|
118
|
-
<!-- if includes -->
|
119
|
-
|
120
|
-
<div id="section">
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
<!-- if method_list -->
|
130
|
-
<div id="methods">
|
131
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
132
|
-
|
133
|
-
<div id="method-M000055" class="method-detail">
|
134
|
-
<a name="M000055"></a>
|
135
|
-
|
136
|
-
<div class="method-heading">
|
137
|
-
<a href="#M000055" class="method-signature">
|
138
|
-
<span class="method-name">inspect</span><span class="method-args">()</span>
|
139
|
-
</a>
|
140
|
-
</div>
|
141
|
-
|
142
|
-
<div class="method-description">
|
143
|
-
<p><a class="source-toggle" href="#"
|
144
|
-
onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
|
145
|
-
<div class="method-source-code" id="M000055-source">
|
146
|
-
<pre>
|
147
|
-
<span class="ruby-comment cmt"># File lib/blocker.rb, line 731</span>
|
148
|
-
731: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
|
149
|
-
732: <span class="ruby-node">"Blocker: #{@value.inspect} (index: #{@lookup})"</span>
|
150
|
-
733: <span class="ruby-keyword kw">end</span>
|
151
|
-
</pre>
|
152
|
-
</div>
|
153
|
-
</div>
|
154
|
-
</div>
|
155
|
-
|
156
|
-
|
157
|
-
</div>
|
158
|
-
|
159
|
-
|
160
|
-
</div>
|
161
|
-
|
162
|
-
|
163
|
-
<div id="validator-badges">
|
164
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
165
|
-
</div>
|
166
|
-
|
167
|
-
</body>
|
168
|
-
</html>
|
@@ -1,347 +0,0 @@
|
|
1
|
-
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: BinaryBlocker::CountedArrayEncoder</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">BinaryBlocker::CountedArrayEncoder</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/blocker_rb.html">
|
59
|
-
lib/blocker.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="GroupEncoder.html">
|
69
|
-
GroupEncoder
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
<div id="diagram">
|
83
|
-
<map id="map" name="map">
|
84
|
-
<area shape="rect" coords="252,146,351,194" href="GroupEncoder.html" alt="GroupEncoder" />
|
85
|
-
<area shape="rect" coords="27,242,123,290" href="ListOfEncoder.html" alt="ListOfEncoder" />
|
86
|
-
<area shape="rect" coords="147,242,219,290" href="Blocker.html" alt="Blocker" />
|
87
|
-
<area shape="rect" coords="243,242,360,290" href="FixedArrayEncoder.html" alt="FixedArrayEncoder" />
|
88
|
-
<area shape="rect" coords="384,242,517,290" href="CountedArrayEncoder.html" alt="CountedArrayEncoder" />
|
89
|
-
<area shape="rect" coords="683,50,755,98" href="Encoder.html" alt="Encoder" />
|
90
|
-
<area shape="rect" coords="605,146,707,194" href="SimpleEncoder.html" alt="SimpleEncoder" />
|
91
|
-
<area shape="rect" coords="731,146,835,194" href="BitFieldEncoder.html" alt="BitFieldEncoder" />
|
92
|
-
<area shape="rect" coords="859,146,960,194" href="OneOfEncoder.html" alt="OneOfEncoder" />
|
93
|
-
<area shape="rect" coords="541,242,683,290" href="PackedNumberEncoder.html" alt="PackedNumberEncoder" />
|
94
|
-
<area shape="rect" coords="469,338,595,386" href="PackedDateEncoder.html" alt="PackedDateEncoder" />
|
95
|
-
<area shape="rect" coords="619,338,765,386" href="PackedDateTimeEncoder.html" alt="PackedDateTimeEncoder" />
|
96
|
-
<area shape="rect" coords="707,242,827,290" href="FixedStringEncoder.html" alt="FixedStringEncoder" />
|
97
|
-
<area shape="rect" coords="851,242,1005,290" href="FixedUTF16StringEncoder.html" alt="FixedUTF16StringEncoder" />
|
98
|
-
<area shape="rect" coords="16,16,1016,396" href="../BinaryBlocker.html" alt="BinaryBlocker" />
|
99
|
-
</map>
|
100
|
-
<img src="../../dot/m_0_0.png" usemap="#map" border="0" alt="Module: BinaryBlocker" />
|
101
|
-
</div>
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
</div>
|
106
|
-
|
107
|
-
<div id="method-list">
|
108
|
-
<h3 class="section-bar">Methods</h3>
|
109
|
-
|
110
|
-
<div class="name-list">
|
111
|
-
<a href="#M000091"><<</a>
|
112
|
-
<a href="#M000089">[]</a>
|
113
|
-
<a href="#M000090">[]=</a>
|
114
|
-
<a href="#M000088">deblock</a>
|
115
|
-
<a href="#M000087">internal_block</a>
|
116
|
-
<a href="#M000093">length</a>
|
117
|
-
<a href="#M000086">new</a>
|
118
|
-
<a href="#M000092">size</a>
|
119
|
-
</div>
|
120
|
-
</div>
|
121
|
-
|
122
|
-
</div>
|
123
|
-
|
124
|
-
|
125
|
-
<!-- if includes -->
|
126
|
-
|
127
|
-
<div id="section">
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
<!-- if method_list -->
|
137
|
-
<div id="methods">
|
138
|
-
<h3 class="section-bar">Public Class methods</h3>
|
139
|
-
|
140
|
-
<div id="method-M000086" class="method-detail">
|
141
|
-
<a name="M000086"></a>
|
142
|
-
|
143
|
-
<div class="method-heading">
|
144
|
-
<a href="#M000086" class="method-signature">
|
145
|
-
<span class="method-name">new</span><span class="method-args">(count_type, classes, *opts)</span>
|
146
|
-
</a>
|
147
|
-
</div>
|
148
|
-
|
149
|
-
<div class="method-description">
|
150
|
-
<p><a class="source-toggle" href="#"
|
151
|
-
onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
|
152
|
-
<div class="method-source-code" id="M000086-source">
|
153
|
-
<pre>
|
154
|
-
<span class="ruby-comment cmt"># File lib/blocker.rb, line 617</span>
|
155
|
-
617: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">count_type</span>, <span class="ruby-identifier">classes</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
|
156
|
-
618: <span class="ruby-comment cmt"># this is dynamic now, but we init to zero for the range checking</span>
|
157
|
-
619: <span class="ruby-ivar">@count_enc</span> = <span class="ruby-constant">BinaryBlocker</span>.<span class="ruby-identifier">pack_symbols</span>[<span class="ruby-identifier">count_type</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">count_type</span>
|
158
|
-
620: <span class="ruby-ivar">@count</span> = <span class="ruby-value">0</span>
|
159
|
-
621: <span class="ruby-identifier">initialize_options</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
|
160
|
-
622: <span class="ruby-ivar">@classes</span> = <span class="ruby-identifier">classes</span>
|
161
|
-
623: <span class="ruby-ivar">@value</span> = []
|
162
|
-
624: <span class="ruby-identifier">initialize_data</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
|
163
|
-
625: <span class="ruby-keyword kw">end</span>
|
164
|
-
</pre>
|
165
|
-
</div>
|
166
|
-
</div>
|
167
|
-
</div>
|
168
|
-
|
169
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
170
|
-
|
171
|
-
<div id="method-M000091" class="method-detail">
|
172
|
-
<a name="M000091"></a>
|
173
|
-
|
174
|
-
<div class="method-heading">
|
175
|
-
<a href="#M000091" class="method-signature">
|
176
|
-
<span class="method-name"><<</span><span class="method-args">(val)</span>
|
177
|
-
</a>
|
178
|
-
</div>
|
179
|
-
|
180
|
-
<div class="method-description">
|
181
|
-
<p><a class="source-toggle" href="#"
|
182
|
-
onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
|
183
|
-
<div class="method-source-code" id="M000091-source">
|
184
|
-
<pre>
|
185
|
-
<span class="ruby-comment cmt"># File lib/blocker.rb, line 654</span>
|
186
|
-
654: <span class="ruby-keyword kw">def</span> <span class="ruby-operator"><<</span>(<span class="ruby-identifier">val</span>)
|
187
|
-
655: <span class="ruby-ivar">@count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
188
|
-
656: <span class="ruby-ivar">@value</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">val</span>
|
189
|
-
657: <span class="ruby-keyword kw">end</span>
|
190
|
-
</pre>
|
191
|
-
</div>
|
192
|
-
</div>
|
193
|
-
</div>
|
194
|
-
|
195
|
-
<div id="method-M000089" class="method-detail">
|
196
|
-
<a name="M000089"></a>
|
197
|
-
|
198
|
-
<div class="method-heading">
|
199
|
-
<a href="#M000089" class="method-signature">
|
200
|
-
<span class="method-name">[]</span><span class="method-args">(offset)</span>
|
201
|
-
</a>
|
202
|
-
</div>
|
203
|
-
|
204
|
-
<div class="method-description">
|
205
|
-
<p><a class="source-toggle" href="#"
|
206
|
-
onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
|
207
|
-
<div class="method-source-code" id="M000089-source">
|
208
|
-
<pre>
|
209
|
-
<span class="ruby-comment cmt"># File lib/blocker.rb, line 644</span>
|
210
|
-
644: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">offset</span>)
|
211
|
-
645: <span class="ruby-identifier">raise</span> <span class="ruby-constant">RangeError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"Access (#{offset}) out of range (#{@count})"</span>) <span class="ruby-keyword kw">unless</span> (<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-ivar">@count</span>) <span class="ruby-operator">===</span> <span class="ruby-identifier">offset</span>
|
212
|
-
646: <span class="ruby-ivar">@value</span>[<span class="ruby-identifier">offset</span>]
|
213
|
-
647: <span class="ruby-keyword kw">end</span>
|
214
|
-
</pre>
|
215
|
-
</div>
|
216
|
-
</div>
|
217
|
-
</div>
|
218
|
-
|
219
|
-
<div id="method-M000090" class="method-detail">
|
220
|
-
<a name="M000090"></a>
|
221
|
-
|
222
|
-
<div class="method-heading">
|
223
|
-
<a href="#M000090" class="method-signature">
|
224
|
-
<span class="method-name">[]=</span><span class="method-args">(offset,val)</span>
|
225
|
-
</a>
|
226
|
-
</div>
|
227
|
-
|
228
|
-
<div class="method-description">
|
229
|
-
<p><a class="source-toggle" href="#"
|
230
|
-
onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
|
231
|
-
<div class="method-source-code" id="M000090-source">
|
232
|
-
<pre>
|
233
|
-
<span class="ruby-comment cmt"># File lib/blocker.rb, line 649</span>
|
234
|
-
649: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">offset</span>,<span class="ruby-identifier">val</span>)
|
235
|
-
650: <span class="ruby-identifier">raise</span> <span class="ruby-constant">RangeError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"Access (#{offset}) out of range (#{@count})"</span>) <span class="ruby-keyword kw">unless</span> (<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-ivar">@count</span>) <span class="ruby-operator">===</span> <span class="ruby-identifier">offset</span>
|
236
|
-
651: <span class="ruby-ivar">@value</span>[<span class="ruby-identifier">offset</span>] = <span class="ruby-identifier">val</span>
|
237
|
-
652: <span class="ruby-keyword kw">end</span>
|
238
|
-
</pre>
|
239
|
-
</div>
|
240
|
-
</div>
|
241
|
-
</div>
|
242
|
-
|
243
|
-
<div id="method-M000088" class="method-detail">
|
244
|
-
<a name="M000088"></a>
|
245
|
-
|
246
|
-
<div class="method-heading">
|
247
|
-
<a href="#M000088" class="method-signature">
|
248
|
-
<span class="method-name">deblock</span><span class="method-args">(io)</span>
|
249
|
-
</a>
|
250
|
-
</div>
|
251
|
-
|
252
|
-
<div class="method-description">
|
253
|
-
<p><a class="source-toggle" href="#"
|
254
|
-
onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
|
255
|
-
<div class="method-source-code" id="M000088-source">
|
256
|
-
<pre>
|
257
|
-
<span class="ruby-comment cmt"># File lib/blocker.rb, line 632</span>
|
258
|
-
632: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deblock</span>(<span class="ruby-identifier">io</span>)
|
259
|
-
633: <span class="ruby-identifier">length</span> = <span class="ruby-constant">BinaryBlocker</span>.<span class="ruby-identifier">sizeof_format</span>(<span class="ruby-ivar">@count_enc</span>)
|
260
|
-
634: <span class="ruby-identifier">result</span> = []
|
261
|
-
635: <span class="ruby-identifier">with_guarded_io_pos</span>(<span class="ruby-identifier">io</span>) <span class="ruby-keyword kw">do</span>
|
262
|
-
636: <span class="ruby-ivar">@count</span> = <span class="ruby-identifier">io</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">length</span>).<span class="ruby-identifier">unpack</span>(<span class="ruby-ivar">@count_enc</span>)
|
263
|
-
637: <span class="ruby-ivar">@count</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span>
|
264
|
-
638: <span class="ruby-identifier">result</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">OneOfEncoder</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@classes</span>, <span class="ruby-identifier">io</span>, <span class="ruby-ivar">@opts</span>)
|
265
|
-
639: <span class="ruby-keyword kw">end</span>
|
266
|
-
640: <span class="ruby-keyword kw">end</span>
|
267
|
-
641: <span class="ruby-ivar">@value</span> = <span class="ruby-identifier">result</span>
|
268
|
-
642: <span class="ruby-keyword kw">end</span>
|
269
|
-
</pre>
|
270
|
-
</div>
|
271
|
-
</div>
|
272
|
-
</div>
|
273
|
-
|
274
|
-
<div id="method-M000087" class="method-detail">
|
275
|
-
<a name="M000087"></a>
|
276
|
-
|
277
|
-
<div class="method-heading">
|
278
|
-
<a href="#M000087" class="method-signature">
|
279
|
-
<span class="method-name">internal_block</span><span class="method-args">(val)</span>
|
280
|
-
</a>
|
281
|
-
</div>
|
282
|
-
|
283
|
-
<div class="method-description">
|
284
|
-
<p><a class="source-toggle" href="#"
|
285
|
-
onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
|
286
|
-
<div class="method-source-code" id="M000087-source">
|
287
|
-
<pre>
|
288
|
-
<span class="ruby-comment cmt"># File lib/blocker.rb, line 627</span>
|
289
|
-
627: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">internal_block</span>(<span class="ruby-identifier">val</span>)
|
290
|
-
628: <span class="ruby-identifier">buf</span> = [<span class="ruby-identifier">val</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-ivar">@count_enc</span>)
|
291
|
-
629: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-identifier">buf</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span>, <span class="ruby-identifier">o</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">block</span> }
|
292
|
-
630: <span class="ruby-keyword kw">end</span>
|
293
|
-
</pre>
|
294
|
-
</div>
|
295
|
-
</div>
|
296
|
-
</div>
|
297
|
-
|
298
|
-
<div id="method-M000093" class="method-detail">
|
299
|
-
<a name="M000093"></a>
|
300
|
-
|
301
|
-
<div class="method-heading">
|
302
|
-
<span class="method-name">length</span><span class="method-args">()</span>
|
303
|
-
</div>
|
304
|
-
|
305
|
-
<div class="method-description">
|
306
|
-
<p>
|
307
|
-
Alias for <a href="CountedArrayEncoder.html#M000092">size</a>
|
308
|
-
</p>
|
309
|
-
</div>
|
310
|
-
</div>
|
311
|
-
|
312
|
-
<div id="method-M000092" class="method-detail">
|
313
|
-
<a name="M000092"></a>
|
314
|
-
|
315
|
-
<div class="method-heading">
|
316
|
-
<a href="#M000092" class="method-signature">
|
317
|
-
<span class="method-name">size</span><span class="method-args">()</span>
|
318
|
-
</a>
|
319
|
-
</div>
|
320
|
-
|
321
|
-
<div class="method-description">
|
322
|
-
<p><a class="source-toggle" href="#"
|
323
|
-
onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
|
324
|
-
<div class="method-source-code" id="M000092-source">
|
325
|
-
<pre>
|
326
|
-
<span class="ruby-comment cmt"># File lib/blocker.rb, line 659</span>
|
327
|
-
659: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">size</span>
|
328
|
-
660: <span class="ruby-ivar">@count</span>
|
329
|
-
661: <span class="ruby-keyword kw">end</span>
|
330
|
-
</pre>
|
331
|
-
</div>
|
332
|
-
</div>
|
333
|
-
</div>
|
334
|
-
|
335
|
-
|
336
|
-
</div>
|
337
|
-
|
338
|
-
|
339
|
-
</div>
|
340
|
-
|
341
|
-
|
342
|
-
<div id="validator-badges">
|
343
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
344
|
-
</div>
|
345
|
-
|
346
|
-
</body>
|
347
|
-
</html>
|