binaryparse 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/binaryparse.gemspec +18 -0
  2. data/doc/classes/BinaryBlocker/BitFieldEncoder.html +328 -0
  3. data/doc/classes/BinaryBlocker/Blocker.html +168 -0
  4. data/doc/classes/BinaryBlocker/CountedArrayEncoder.html +347 -0
  5. data/doc/classes/BinaryBlocker/Encoder.html +526 -0
  6. data/doc/classes/BinaryBlocker/FixedArrayEncoder.html +278 -0
  7. data/doc/classes/BinaryBlocker/FixedStringEncoder.html +177 -0
  8. data/doc/classes/BinaryBlocker/FixedUTF16StringEncoder.html +229 -0
  9. data/doc/classes/BinaryBlocker/GroupEncoder.html +650 -0
  10. data/doc/classes/BinaryBlocker/ListOfEncoder.html +343 -0
  11. data/doc/classes/BinaryBlocker/OneOfEncoder.html +306 -0
  12. data/doc/classes/BinaryBlocker/PackedDateEncoder.html +220 -0
  13. data/doc/classes/BinaryBlocker/PackedDateTimeEncoder.html +220 -0
  14. data/doc/classes/BinaryBlocker/PackedNumberEncoder.html +231 -0
  15. data/doc/classes/BinaryBlocker/SimpleEncoder.html +284 -0
  16. data/doc/classes/BinaryBlocker.html +329 -0
  17. data/doc/classes/BufferedIO.html +324 -0
  18. data/doc/classes/TestBlocker/BBDate.html +120 -0
  19. data/doc/classes/TestBlocker/BBList.html +120 -0
  20. data/doc/classes/TestBlocker/BBPacked.html +120 -0
  21. data/doc/classes/TestBlocker/BBString.html +120 -0
  22. data/doc/classes/TestBlocker/BBSub1.html +120 -0
  23. data/doc/classes/TestBlocker/BBSub2.html +120 -0
  24. data/doc/classes/TestBlocker/BBTest1.html +120 -0
  25. data/doc/classes/TestBlocker/BBTest2.html +120 -0
  26. data/doc/classes/TestBlocker/BBTest3.html +120 -0
  27. data/doc/classes/TestBlocker/BBTest4.html +120 -0
  28. data/doc/classes/TestBlocker/BBTest5.html +120 -0
  29. data/doc/classes/TestBlocker/BBTest6.html +120 -0
  30. data/doc/classes/TestBlocker/BBTest7.html +120 -0
  31. data/doc/classes/TestBlocker/BBTime.html +120 -0
  32. data/doc/classes/TestBlocker/BBUTF16.html +120 -0
  33. data/doc/classes/TestBlocker/ItemA.html +120 -0
  34. data/doc/classes/TestBlocker/ItemB.html +120 -0
  35. data/doc/classes/TestBlocker.html +802 -0
  36. data/doc/created.rid +1 -0
  37. data/doc/dot/f_0.dot +208 -0
  38. data/doc/dot/f_0.png +0 -0
  39. data/doc/dot/f_1.dot +23 -0
  40. data/doc/dot/f_1.png +0 -0
  41. data/doc/dot/f_2.dot +32 -0
  42. data/doc/dot/f_2.png +0 -0
  43. data/doc/dot/m_0_0.dot +208 -0
  44. data/doc/dot/m_0_0.png +0 -0
  45. data/doc/files/lib/blocker_rb.html +144 -0
  46. data/doc/files/lib/buffered_io_rb.html +115 -0
  47. data/doc/files/test/test_blocker_rb.html +116 -0
  48. data/doc/fr_class_index.html +60 -0
  49. data/doc/fr_file_index.html +29 -0
  50. data/doc/fr_method_index.html +135 -0
  51. data/doc/index.html +24 -0
  52. data/doc/rdoc-style.css +208 -0
  53. data/lib/blocker.rb +736 -0
  54. data/lib/buffered_io.rb +58 -0
  55. data/test/test_blocker.rb +412 -0
  56. metadata +111 -0
@@ -0,0 +1,229 @@
1
+ <?xml version="1.0" encoding="iso-8859-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::FixedUTF16StringEncoder</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::FixedUTF16StringEncoder</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="SimpleEncoder.html">
69
+ SimpleEncoder
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="#M000075">internal_block</a>&nbsp;&nbsp;
112
+ <a href="#M000076">internal_deblock</a>&nbsp;&nbsp;
113
+ <a href="#M000074">new</a>&nbsp;&nbsp;
114
+ </div>
115
+ </div>
116
+
117
+ </div>
118
+
119
+
120
+ <!-- if includes -->
121
+
122
+ <div id="section">
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+ <!-- if method_list -->
132
+ <div id="methods">
133
+ <h3 class="section-bar">Public Class methods</h3>
134
+
135
+ <div id="method-M000074" class="method-detail">
136
+ <a name="M000074"></a>
137
+
138
+ <div class="method-heading">
139
+ <a href="#M000074" class="method-signature">
140
+ <span class="method-name">new</span><span class="method-args">(*opts)</span>
141
+ </a>
142
+ </div>
143
+
144
+ <div class="method-description">
145
+ <p><a class="source-toggle" href="#"
146
+ onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
147
+ <div class="method-source-code" id="M000074-source">
148
+ <pre>
149
+ <span class="ruby-comment cmt"># File lib/blocker.rb, line 399</span>
150
+ 399: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
151
+ 400: <span class="ruby-identifier">initialize_options</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
152
+ 401:
153
+ 402: <span class="ruby-ivar">@length</span> = <span class="ruby-ivar">@opts</span>[<span class="ruby-identifier">:length</span>].<span class="ruby-identifier">to_i</span>
154
+ 403: <span class="ruby-ivar">@length</span> <span class="ruby-operator">*=</span> <span class="ruby-value">2</span>
155
+ 404: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;Missing or invalid string length&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
156
+ 405: <span class="ruby-ivar">@format</span> = <span class="ruby-node">&quot;Z#{@length}&quot;</span>
157
+ 406:
158
+ 407: <span class="ruby-ivar">@key</span> = <span class="ruby-ivar">@opts</span>[<span class="ruby-identifier">:key</span>]
159
+ 408: <span class="ruby-ivar">@valid</span> = <span class="ruby-ivar">@opts</span>[<span class="ruby-identifier">:valid</span>]
160
+ 409:
161
+ 410: <span class="ruby-identifier">initialize_data</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
162
+ 411: <span class="ruby-keyword kw">end</span>
163
+ </pre>
164
+ </div>
165
+ </div>
166
+ </div>
167
+
168
+ <h3 class="section-bar">Public Instance methods</h3>
169
+
170
+ <div id="method-M000075" class="method-detail">
171
+ <a name="M000075"></a>
172
+
173
+ <div class="method-heading">
174
+ <a href="#M000075" class="method-signature">
175
+ <span class="method-name">internal_block</span><span class="method-args">(val)</span>
176
+ </a>
177
+ </div>
178
+
179
+ <div class="method-description">
180
+ <p><a class="source-toggle" href="#"
181
+ onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
182
+ <div class="method-source-code" id="M000075-source">
183
+ <pre>
184
+ <span class="ruby-comment cmt"># File lib/blocker.rb, line 413</span>
185
+ 413: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">internal_block</span>(<span class="ruby-identifier">val</span>)
186
+ 414: [<span class="ruby-constant">Uconv</span>.<span class="ruby-identifier">u8tou16</span>(<span class="ruby-identifier">val</span> <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;&quot;</span>)].<span class="ruby-identifier">pack</span>(<span class="ruby-ivar">@format</span>)
187
+ 415: <span class="ruby-keyword kw">end</span>
188
+ </pre>
189
+ </div>
190
+ </div>
191
+ </div>
192
+
193
+ <div id="method-M000076" class="method-detail">
194
+ <a name="M000076"></a>
195
+
196
+ <div class="method-heading">
197
+ <a href="#M000076" class="method-signature">
198
+ <span class="method-name">internal_deblock</span><span class="method-args">(io)</span>
199
+ </a>
200
+ </div>
201
+
202
+ <div class="method-description">
203
+ <p><a class="source-toggle" href="#"
204
+ onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
205
+ <div class="method-source-code" id="M000076-source">
206
+ <pre>
207
+ <span class="ruby-comment cmt"># File lib/blocker.rb, line 417</span>
208
+ 417: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">internal_deblock</span>(<span class="ruby-identifier">io</span>)
209
+ 418: <span class="ruby-identifier">buffer</span> = <span class="ruby-identifier">io</span>.<span class="ruby-identifier">read</span>(<span class="ruby-ivar">@length</span>)
210
+ 419: <span class="ruby-constant">Uconv</span>.<span class="ruby-identifier">u16tou8</span>(<span class="ruby-identifier">buffer</span>).<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/\000+$/</span>,<span class="ruby-value str">''</span>)
211
+ 420: <span class="ruby-keyword kw">end</span>
212
+ </pre>
213
+ </div>
214
+ </div>
215
+ </div>
216
+
217
+
218
+ </div>
219
+
220
+
221
+ </div>
222
+
223
+
224
+ <div id="validator-badges">
225
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
226
+ </div>
227
+
228
+ </body>
229
+ </html>