/usr/share/doc/libcamlpdf-ocaml-dev/html/Pdfio.html is in libcamlpdf-ocaml-dev 2.1.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Pdfutil.html">
<link rel="next" href="Pdftransform.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Pdfutil" rel="Chapter" href="Pdfutil.html">
<link title="Pdfio" rel="Chapter" href="Pdfio.html">
<link title="Pdftransform" rel="Chapter" href="Pdftransform.html">
<link title="Pdfunits" rel="Chapter" href="Pdfunits.html">
<link title="Pdfpaper" rel="Chapter" href="Pdfpaper.html">
<link title="Pdf" rel="Chapter" href="Pdf.html">
<link title="Pdfcryptprimitives" rel="Chapter" href="Pdfcryptprimitives.html">
<link title="Pdfcrypt" rel="Chapter" href="Pdfcrypt.html">
<link title="Pdfflate" rel="Chapter" href="Pdfflate.html">
<link title="Pdfcodec" rel="Chapter" href="Pdfcodec.html">
<link title="Pdfwrite" rel="Chapter" href="Pdfwrite.html">
<link title="Pdfgenlex" rel="Chapter" href="Pdfgenlex.html">
<link title="Pdfread" rel="Chapter" href="Pdfread.html">
<link title="Pdfjpeg" rel="Chapter" href="Pdfjpeg.html">
<link title="Pdfops" rel="Chapter" href="Pdfops.html">
<link title="Pdfdest" rel="Chapter" href="Pdfdest.html">
<link title="Pdfmarks" rel="Chapter" href="Pdfmarks.html">
<link title="Pdfpagelabels" rel="Chapter" href="Pdfpagelabels.html">
<link title="Pdfpage" rel="Chapter" href="Pdfpage.html">
<link title="Pdfannot" rel="Chapter" href="Pdfannot.html">
<link title="Pdffun" rel="Chapter" href="Pdffun.html">
<link title="Pdfspace" rel="Chapter" href="Pdfspace.html">
<link title="Pdfimage" rel="Chapter" href="Pdfimage.html">
<link title="Pdfafm" rel="Chapter" href="Pdfafm.html">
<link title="Pdfafmdata" rel="Chapter" href="Pdfafmdata.html">
<link title="Pdfglyphlist" rel="Chapter" href="Pdfglyphlist.html">
<link title="Pdftext" rel="Chapter" href="Pdftext.html">
<link title="Pdfstandard14" rel="Chapter" href="Pdfstandard14.html">
<link title="Pdfgraphics" rel="Chapter" href="Pdfgraphics.html">
<link title="Pdfshapes" rel="Chapter" href="Pdfshapes.html">
<link title="Pdfdate" rel="Chapter" href="Pdfdate.html">
<link title="Pdfocg" rel="Chapter" href="Pdfocg.html">
<link title="Pdfcff" rel="Chapter" href="Pdfcff.html">
<link title="Pdftype1" rel="Chapter" href="Pdftype1.html">
<link title="Pdftruetype" rel="Chapter" href="Pdftruetype.html">
<link title="Pdftype0" rel="Chapter" href="Pdftype0.html">
<link title="Pdfmerge" rel="Chapter" href="Pdfmerge.html"><link title="Building inputs" rel="Section" href="#2_Buildinginputs">
<link title="Building outputs" rel="Section" href="#2_Buildingoutputs">
<link title="Building an input-output" rel="Section" href="#2_Buildinganinputoutput">
<link title="Building an input-output" rel="Section" href="#2_Buildinganinputoutput">
<link title="Compound operations on inputs" rel="Section" href="#2_Compoundoperationsoninputs">
<link title="Bytes " rel="Section" href="#2_Bytes">
<link title="Bit streams for reading" rel="Section" href="#2_Bitstreamsforreading">
<link title="Bit streams for writing" rel="Section" href="#2_Bitstreamsforwriting">
<link title="Debug " rel="Section" href="#2_Debug">
<title>Pdfio</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Pdfutil.html" title="Pdfutil">Previous</a>
<a class="up" href="index.html" title="Index">Up</a>
<a class="post" href="Pdftransform.html" title="Pdftransform">Next</a>
</div>
<h1>Module <a href="type_Pdfio.html">Pdfio</a></h1>
<pre><span class="keyword">module</span> Pdfio: <code class="code">sig</code> <a href="Pdfio.html">..</a> <code class="code">end</code></pre><div class="info module top">
Generic Input/Ouput from/to channels, strings, files etc.<br>
</div>
<hr width="100%">
<pre><code><span id="TYPEinput"><span class="keyword">type</span> <code class="type"></code>input</span> = {</code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTinput.pos_in">pos_in</span> : <code class="type">unit -> int</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTinput.seek_in">seek_in</span> : <code class="type">int -> unit</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTinput.input_char">input_char</span> : <code class="type">unit -> char option</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTinput.input_byte">input_byte</span> : <code class="type">unit -> int</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTinput.in_channel_length">in_channel_length</span> : <code class="type">int</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTinput.set_offset">set_offset</span> : <code class="type">int -> unit</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTinput.caml_channel">caml_channel</span> : <code class="type">Pervasives.in_channel option</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTinput.source">source</span> : <code class="type">string</code>;</code></td>
</tr></table>
}
<div class="info ">
An input.
<p>
<ul>
<li>Calling <code class="code">pos_in ()</code> will give the current position (i.e the index of the next byte to be read) in the range zero to the length of the channel minus one.</li>
<li><code class="code">seek_in x</code> moves to a given position.</li>
<li><code class="code">input_char ()</code> returns None if end of input, or the next byte of the input as a character.</li>
<li><code class="code">input_byte ()</code> returns the next byte as an integer, or <code class="code">Pdfio.no_more</code> in case of end of input. </li>
<li><code class="code">in_channel_length</code> is the length of the channel.</li>
<li><code class="code">set_offset</code> shifts the channel so positions run from offset to channel_length + offset - 1 instead of 0 to channel_length - 1.</li>
<li><code class="code">caml_channel</code> is the underlying OCaml channel (if any) of the input.</li>
<li><code class="code">source</code> is a string used to inficate the original source of the data, for debugging purposes.</li>
</ul>
<br>
</div>
<pre><code><span id="TYPEoutput"><span class="keyword">type</span> <code class="type"></code>output</span> = {</code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELToutput.pos_out">pos_out</span> : <code class="type">unit -> int</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELToutput.seek_out">seek_out</span> : <code class="type">int -> unit</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELToutput.output_char">output_char</span> : <code class="type">char -> unit</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELToutput.output_byte">output_byte</span> : <code class="type">int -> unit</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELToutput.output_string">output_string</span> : <code class="type">string -> unit</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELToutput.out_caml_channel">out_caml_channel</span> : <code class="type">Pervasives.out_channel option</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELToutput.out_channel_length">out_channel_length</span> : <code class="type">unit -> int</code>;</code></td>
</tr></table>
}
<div class="info ">
An output.
<p>
<ul>
<li>Calling <code class="code">pos_out ()</code> gives the position of the next byte to be written</li>
<li><code class="code">seek_out x</code> moves to a a given position in the output</li>
<li><code class="code">output_char</code> writes a given character as the next byte</li>
<li><code class="code">output_byte</code> writes an integer between 0 and 255 as the next byte</li>
<li><code class="code">output_string</code> writes a string as a sequence of bytes</li>
<li><code class="code">out_caml_channel</code> holds the OCaml channel this output is based on, if any</li>
<li><code class="code">out_channel_length ()</code> gives the current length of the output channel</li>
</ul>
<br>
</div>
<pre><span id="VALno_more"><span class="keyword">val</span> no_more</span> : <code class="type">int</code></pre><div class="info ">
A distinguished byte value indicating "no more input"<br>
</div>
<pre><span id="TYPEbytes"><span class="keyword">type</span> <code class="type"></code>bytes</span> </pre>
<div class="info ">
The type of fast to access but possibly very large arrays of bytes.<br>
</div>
<br>
<h2 id="2_Buildinginputs">Building inputs</h2><br>
<pre><span id="VALinput_of_channel"><span class="keyword">val</span> input_of_channel</span> : <code class="type">?source:string -> Pervasives.in_channel -> <a href="Pdfio.html#TYPEinput">input</a></code></pre><div class="info ">
Make an input from an OCaml input channel.<br>
</div>
<pre><span id="VALinput_of_bytes"><span class="keyword">val</span> input_of_bytes</span> : <code class="type">?source:string -> <a href="Pdfio.html#TYPEbytes">bytes</a> -> <a href="Pdfio.html#TYPEinput">input</a></code></pre><div class="info ">
Make an input from a bytes.<br>
</div>
<pre><span id="VALinput_of_string"><span class="keyword">val</span> input_of_string</span> : <code class="type">?source:string -> string -> <a href="Pdfio.html#TYPEinput">input</a></code></pre><div class="info ">
Make an input from a string.<br>
</div>
<br>
<h2 id="2_Buildingoutputs">Building outputs</h2><br>
<pre><span id="VALoutput_of_channel"><span class="keyword">val</span> output_of_channel</span> : <code class="type">Pervasives.out_channel -> <a href="Pdfio.html#TYPEoutput">output</a></code></pre><div class="info ">
Make an output from an OCaml channel<br>
</div>
<br>
<h2 id="2_Buildinganinputoutput">Building an input-output</h2><br>
<br>
<h2 id="2_Buildinganinputoutput">Building an input-output</h2><br>
<br>
An input-output in this context is an output of a bytes, whose content can
be extracted to another bytes having been written. For example, one might use a
write bitstream (see below), and then extract the result into a <code class="code">bytes</code><br>
<pre><span id="VALinput_output_of_bytes"><span class="keyword">val</span> input_output_of_bytes</span> : <code class="type">int -> <a href="Pdfio.html#TYPEoutput">output</a> * <a href="Pdfio.html#TYPEbytes">bytes</a> Pervasives.ref</code></pre><div class="info ">
Build an input-ouput, with an initial buffer size.<br>
</div>
<pre><span id="VALextract_bytes_from_input_output"><span class="keyword">val</span> extract_bytes_from_input_output</span> : <code class="type"><a href="Pdfio.html#TYPEoutput">output</a> -> <a href="Pdfio.html#TYPEbytes">bytes</a> Pervasives.ref -> <a href="Pdfio.html#TYPEbytes">bytes</a></code></pre><div class="info ">
Extract the contents of an input-output in bytes<br>
</div>
<br>
<h2 id="2_Compoundoperationsoninputs">Compound operations on inputs</h2><br>
<pre><span id="VALnudge"><span class="keyword">val</span> nudge</span> : <code class="type"><a href="Pdfio.html#TYPEinput">input</a> -> unit</code></pre><div class="info ">
Move forward one byte<br>
</div>
<pre><span id="VALrewind"><span class="keyword">val</span> rewind</span> : <code class="type"><a href="Pdfio.html#TYPEinput">input</a> -> unit</code></pre><div class="info ">
Move backward one byte<br>
</div>
<pre><span id="VALpeek_char"><span class="keyword">val</span> peek_char</span> : <code class="type"><a href="Pdfio.html#TYPEinput">input</a> -> char option</code></pre><div class="info ">
Look at the next character without advancing the pointer.<br>
</div>
<pre><span id="VALpeek_byte"><span class="keyword">val</span> peek_byte</span> : <code class="type"><a href="Pdfio.html#TYPEinput">input</a> -> int</code></pre><div class="info ">
Look at the next byte without advancing the pointer. Returns
<code class="code">Pdfio.no_more</code> for end of file.<br>
</div>
<pre><span id="VALread_char_back"><span class="keyword">val</span> read_char_back</span> : <code class="type"><a href="Pdfio.html#TYPEinput">input</a> -> char option</code></pre><div class="info ">
Read the previous character (if there is one), moving the pointer back one.<br>
</div>
<pre><span id="VALread_line"><span class="keyword">val</span> read_line</span> : <code class="type"><a href="Pdfio.html#TYPEinput">input</a> -> string</code></pre><div class="info ">
Read a line from an input in the manner of <code class="code">Pervasives.read_line</code>.<br>
</div>
<pre><span id="VALread_lines"><span class="keyword">val</span> read_lines</span> : <code class="type"><a href="Pdfio.html#TYPEinput">input</a> -> string list</code></pre><div class="info ">
Read all the lines in an input, in the manner of <code class="code">Pervasives.read_line</code>.<br>
</div>
<br>
<h2 id="2_Bytes">Bytes </h2><br>
<pre><span id="VALmkbytes"><span class="keyword">val</span> mkbytes</span> : <code class="type">int -> <a href="Pdfio.html#TYPEbytes">bytes</a></code></pre><div class="info ">
Make bytes from a given size. Contents not initialized.<br>
</div>
<pre><span id="VALbytes_size"><span class="keyword">val</span> bytes_size</span> : <code class="type"><a href="Pdfio.html#TYPEbytes">bytes</a> -> int</code></pre><div class="info ">
Size of bytes.<br>
</div>
<pre><span id="VALfillbytes"><span class="keyword">val</span> fillbytes</span> : <code class="type">int -> <a href="Pdfio.html#TYPEbytes">bytes</a> -> unit</code></pre><div class="info ">
Fill bytes with a value<br>
</div>
<pre><span id="VALprint_bytes"><span class="keyword">val</span> print_bytes</span> : <code class="type"><a href="Pdfio.html#TYPEbytes">bytes</a> -> unit</code></pre><div class="info ">
Print bytes to standard output. Format undefined: for debug only.<br>
</div>
<pre><span id="VALbget"><span class="keyword">val</span> bget</span> : <code class="type"><a href="Pdfio.html#TYPEbytes">bytes</a> -> int -> int</code></pre><div class="info ">
Get the value at a position in a bytes<br>
</div>
<pre><span id="VALbget_unsafe"><span class="keyword">val</span> bget_unsafe</span> : <code class="type"><a href="Pdfio.html#TYPEbytes">bytes</a> -> int -> int</code></pre><div class="info ">
Like <code class="code">bget</code>, but with no range checking<br>
</div>
<pre><span id="VALgetinit"><span class="keyword">val</span> getinit</span> : <code class="type"><a href="Pdfio.html#TYPEoutput">output</a> -> <a href="Pdfio.html#TYPEbytes">bytes</a> -> int -> int -> unit</code></pre><div class="info ">
<code class="code">getinit f s o l</code> calls f on each s within o...l - 1<br>
</div>
<pre><span id="VALbset"><span class="keyword">val</span> bset</span> : <code class="type"><a href="Pdfio.html#TYPEbytes">bytes</a> -> int -> int -> unit</code></pre><div class="info ">
<code class="code">bset s n v</code> sets the value n at position v in bytes<br>
</div>
<pre><span id="VALbset_unsafe"><span class="keyword">val</span> bset_unsafe</span> : <code class="type"><a href="Pdfio.html#TYPEbytes">bytes</a> -> int -> int -> unit</code></pre><div class="info ">
Like <code class="code">bset</code> but with no range checking<br>
</div>
<pre><span id="VALsetinit"><span class="keyword">val</span> setinit</span> : <code class="type"><a href="Pdfio.html#TYPEinput">input</a> -> <a href="Pdfio.html#TYPEbytes">bytes</a> -> int -> int -> unit</code></pre><div class="info ">
<code class="code">setinit f s o l</code> sets s o...o + l - 1 to values generated by f<br>
</div>
<pre><span id="VALsetinit_string"><span class="keyword">val</span> setinit_string</span> : <code class="type"><a href="Pdfio.html#TYPEinput">input</a> -> string -> int -> int -> unit</code></pre><div class="info ">
<code class="code">setinit_string f s o l</code> sets s o...o + l - 1 to values generated by f<br>
</div>
<pre><span id="VALbytes_of_string"><span class="keyword">val</span> bytes_of_string</span> : <code class="type">string -> <a href="Pdfio.html#TYPEbytes">bytes</a></code></pre><div class="info ">
Make bytes from a string.<br>
</div>
<pre><span id="VALbytes_of_list"><span class="keyword">val</span> bytes_of_list</span> : <code class="type">int list -> <a href="Pdfio.html#TYPEbytes">bytes</a></code></pre><div class="info ">
Make bytes from a list of integers, each between 0 and 255.<br>
</div>
<pre><span id="VALbytes_of_charlist"><span class="keyword">val</span> bytes_of_charlist</span> : <code class="type">char list -> <a href="Pdfio.html#TYPEbytes">bytes</a></code></pre><div class="info ">
Make bytes from a character list.<br>
</div>
<pre><span id="VALbytes_of_arraylist"><span class="keyword">val</span> bytes_of_arraylist</span> : <code class="type">int array list -> <a href="Pdfio.html#TYPEbytes">bytes</a></code></pre><div class="info ">
Make bytes from a list of integer arrays.<br>
</div>
<pre><span id="VALbytes_of_int_array"><span class="keyword">val</span> bytes_of_int_array</span> : <code class="type">int array -> <a href="Pdfio.html#TYPEbytes">bytes</a></code></pre><div class="info ">
Make bytes from an integer array<br>
</div>
<pre><span id="VALint_array_of_bytes"><span class="keyword">val</span> int_array_of_bytes</span> : <code class="type"><a href="Pdfio.html#TYPEbytes">bytes</a> -> int array</code></pre><div class="info ">
An integer array of bytes from bytes<br>
</div>
<pre><span id="VALint_array_of_string"><span class="keyword">val</span> int_array_of_string</span> : <code class="type">string -> int array</code></pre><div class="info ">
Integer array from a string<br>
</div>
<pre><span id="VALstring_of_int_arrays"><span class="keyword">val</span> string_of_int_arrays</span> : <code class="type">int array list -> string</code></pre><div class="info ">
A string from a list of integer arrays<br>
</div>
<pre><span id="VALstring_of_int_array"><span class="keyword">val</span> string_of_int_array</span> : <code class="type">int array -> string</code></pre><div class="info ">
A string from a single int array<br>
</div>
<pre><span id="VALbytes_selfmap"><span class="keyword">val</span> bytes_selfmap</span> : <code class="type">(int -> int) -> <a href="Pdfio.html#TYPEbytes">bytes</a> -> unit</code></pre><div class="info ">
Map bytes onto itself using a function on each byte<br>
</div>
<pre><span id="VALstring_of_bytes"><span class="keyword">val</span> string_of_bytes</span> : <code class="type"><a href="Pdfio.html#TYPEbytes">bytes</a> -> string</code></pre><div class="info ">
Make a string from a bytes. Fails if array is longer than
<code class="code">String.max_length</code>.<br>
</div>
<pre><span id="VALcharlist_of_bytes"><span class="keyword">val</span> charlist_of_bytes</span> : <code class="type"><a href="Pdfio.html#TYPEbytes">bytes</a> -> char list</code></pre><div class="info ">
Make a character list from a bytes<br>
</div>
<pre><span id="VALcopybytes"><span class="keyword">val</span> copybytes</span> : <code class="type"><a href="Pdfio.html#TYPEbytes">bytes</a> -> <a href="Pdfio.html#TYPEbytes">bytes</a></code></pre><div class="info ">
Copy bytes.<br>
</div>
<pre><span id="VALbytes_to_output_channel"><span class="keyword">val</span> bytes_to_output_channel</span> : <code class="type">Pervasives.out_channel -> <a href="Pdfio.html#TYPEbytes">bytes</a> -> unit</code></pre><div class="info ">
Write a bytes to an output channel<br>
</div>
<pre><span id="VALbytes_of_input_channel"><span class="keyword">val</span> bytes_of_input_channel</span> : <code class="type">Pervasives.in_channel -> <a href="Pdfio.html#TYPEbytes">bytes</a></code></pre><div class="info ">
Extract a bytes from an input or output.<br>
</div>
<br>
<h2 id="2_Bitstreamsforreading">Bit streams for reading</h2><br>
<pre><span id="TYPEbitstream"><span class="keyword">type</span> <code class="type"></code>bitstream</span> </pre>
<div class="info ">
The type of most-significant-bit-first bitstreams over inputs.<br>
</div>
<pre><span id="VALbitbytes_of_input"><span class="keyword">val</span> bitbytes_of_input</span> : <code class="type"><a href="Pdfio.html#TYPEinput">input</a> -> <a href="Pdfio.html#TYPEbitstream">bitstream</a></code></pre><div class="info ">
Make a bitstream from an input.<br>
</div>
<pre><span id="TYPEbitstream_position"><span class="keyword">type</span> <code class="type"></code>bitstream_position</span> </pre>
<div class="info ">
The type of a position within a bitstream<br>
</div>
<pre><span id="VALbitstream_pos"><span class="keyword">val</span> bitstream_pos</span> : <code class="type"><a href="Pdfio.html#TYPEbitstream">bitstream</a> -> <a href="Pdfio.html#TYPEbitstream_position">bitstream_position</a></code></pre><div class="info ">
Get the current position. It's abstract, so can't be manipulated, but it
can be used to return to a previous point<br>
</div>
<pre><span id="VALbitstream_seek"><span class="keyword">val</span> bitstream_seek</span> : <code class="type"><a href="Pdfio.html#TYPEbitstream">bitstream</a> -> <a href="Pdfio.html#TYPEbitstream_position">bitstream_position</a> -> unit</code></pre><div class="info ">
Seek to a position within a bitstream<br>
</div>
<pre><span id="VALgetbit"><span class="keyword">val</span> getbit</span> : <code class="type"><a href="Pdfio.html#TYPEbitstream">bitstream</a> -> bool</code></pre><div class="info ">
Get a bit<br>
</div>
<pre><span id="VALgetbitint"><span class="keyword">val</span> getbitint</span> : <code class="type"><a href="Pdfio.html#TYPEbitstream">bitstream</a> -> int</code></pre><div class="info ">
Get a bit, but as an integer, 0 or 1.<br>
</div>
<pre><span id="VALalign"><span class="keyword">val</span> align</span> : <code class="type"><a href="Pdfio.html#TYPEbitstream">bitstream</a> -> unit</code></pre><div class="info ">
Align the bitstream on a byte boundary<br>
</div>
<pre><span id="VALgetval_32"><span class="keyword">val</span> getval_32</span> : <code class="type"><a href="Pdfio.html#TYPEbitstream">bitstream</a> -> int -> int32</code></pre><div class="info ">
Get up to 32 bits as a 32 bit value<br>
</div>
<pre><span id="VALgetval_31"><span class="keyword">val</span> getval_31</span> : <code class="type"><a href="Pdfio.html#TYPEbitstream">bitstream</a> -> int -> int</code></pre><div class="info ">
Get up to 31 bits as a native integer<br>
</div>
<br>
<h2 id="2_Bitstreamsforwriting">Bit streams for writing</h2><br>
<pre><span id="TYPEbitstream_write"><span class="keyword">type</span> <code class="type"></code>bitstream_write</span> </pre>
<div class="info ">
The type of most-significant-bit-first bitstreams for writing over outputs.<br>
</div>
<pre><span id="VALmake_write_bitstream"><span class="keyword">val</span> make_write_bitstream</span> : <code class="type">unit -> <a href="Pdfio.html#TYPEbitstream_write">bitstream_write</a></code></pre><div class="info ">
Return a new write bistream.<br>
</div>
<pre><span id="VALputbit"><span class="keyword">val</span> putbit</span> : <code class="type"><a href="Pdfio.html#TYPEbitstream_write">bitstream_write</a> -> int -> unit</code></pre><div class="info ">
Put a single bit, 0 or 1.<br>
</div>
<pre><span id="VALputval"><span class="keyword">val</span> putval</span> : <code class="type"><a href="Pdfio.html#TYPEbitstream_write">bitstream_write</a> -> int -> int32 -> unit</code></pre><div class="info ">
Put a multi-bit value (given as an <code class="code">int32</code>) containing the given number of
useful bits into a bitstream<br>
</div>
<pre><span id="VALalign_write"><span class="keyword">val</span> align_write</span> : <code class="type"><a href="Pdfio.html#TYPEbitstream_write">bitstream_write</a> -> unit</code></pre><div class="info ">
Byte-align.<br>
</div>
<pre><span id="VALwrite_bitstream_append_aligned"><span class="keyword">val</span> write_bitstream_append_aligned</span> : <code class="type"><a href="Pdfio.html#TYPEbitstream_write">bitstream_write</a> -> <a href="Pdfio.html#TYPEbitstream_write">bitstream_write</a> -> <a href="Pdfio.html#TYPEbitstream_write">bitstream_write</a></code></pre><div class="info ">
Append two write bitstreams, aligning at boundary<br>
</div>
<pre><span id="VALbytes_of_write_bitstream"><span class="keyword">val</span> bytes_of_write_bitstream</span> : <code class="type"><a href="Pdfio.html#TYPEbitstream_write">bitstream_write</a> -> <a href="Pdfio.html#TYPEbytes">bytes</a></code></pre><div class="info ">
Build bytes from a write bitstream, padding the with zero-valued bits.<br>
</div>
<br>
<h2 id="2_Debug">Debug </h2><br>
<pre><span id="VALdebug_next_n_chars"><span class="keyword">val</span> debug_next_n_chars</span> : <code class="type">int -> <a href="Pdfio.html#TYPEinput">input</a> -> unit</code></pre><div class="info ">
Debug the next <code class="code">n</code> chars to standard output and then rewind back<br>
</div>
</body></html>
|