<ahref="cio_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">/*</span></div>
<divclass="line"><aname="l00002"></a><spanclass="lineno"> 2</span> <spanclass="comment"> * The copyright in this software is being made available under the 2-clauses </span></div>
<divclass="line"><aname="l00003"></a><spanclass="lineno"> 3</span> <spanclass="comment"> * BSD License, included below. This software may be subject to other third </span></div>
<divclass="line"><aname="l00004"></a><spanclass="lineno"> 4</span> <spanclass="comment"> * party and contributor rights, including patent rights, and no such rights</span></div>
<divclass="line"><aname="l00005"></a><spanclass="lineno"> 5</span> <spanclass="comment"> * are granted under this license.</span></div>
<divclass="line"><aname="l00018"></a><spanclass="lineno"> 18</span> <spanclass="comment"> * Redistribution and use in source and binary forms, with or without</span></div>
<divclass="line"><aname="l00019"></a><spanclass="lineno"> 19</span> <spanclass="comment"> * modification, are permitted provided that the following conditions</span></div>
<divclass="line"><aname="l00020"></a><spanclass="lineno"> 20</span> <spanclass="comment"> * are met:</span></div>
<divclass="line"><aname="l00021"></a><spanclass="lineno"> 21</span> <spanclass="comment"> * 1. Redistributions of source code must retain the above copyright</span></div>
<divclass="line"><aname="l00022"></a><spanclass="lineno"> 22</span> <spanclass="comment"> * notice, this list of conditions and the following disclaimer.</span></div>
<divclass="line"><aname="l00023"></a><spanclass="lineno"> 23</span> <spanclass="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span></div>
<divclass="line"><aname="l00024"></a><spanclass="lineno"> 24</span> <spanclass="comment"> * notice, this list of conditions and the following disclaimer in the</span></div>
<divclass="line"><aname="l00025"></a><spanclass="lineno"> 25</span> <spanclass="comment"> * documentation and/or other materials provided with the distribution.</span></div>
<divclass="line"><aname="l00027"></a><spanclass="lineno"> 27</span> <spanclass="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'</span></div>
<divclass="line"><aname="l00028"></a><spanclass="lineno"> 28</span> <spanclass="comment"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<divclass="line"><aname="l00029"></a><spanclass="lineno"> 29</span> <spanclass="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<divclass="line"><aname="l00030"></a><spanclass="lineno"> 30</span> <spanclass="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div>
<divclass="line"><aname="l00031"></a><spanclass="lineno"> 31</span> <spanclass="comment"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<divclass="line"><aname="l00032"></a><spanclass="lineno"> 32</span> <spanclass="comment"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<divclass="line"><aname="l00033"></a><spanclass="lineno"> 33</span> <spanclass="comment"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<divclass="line"><aname="l00034"></a><spanclass="lineno"> 34</span> <spanclass="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<divclass="line"><aname="l00035"></a><spanclass="lineno"> 35</span> <spanclass="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<divclass="line"><aname="l00036"></a><spanclass="lineno"> 36</span> <spanclass="comment"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<divclass="line"><aname="l00037"></a><spanclass="lineno"> 37</span> <spanclass="comment"> * POSSIBILITY OF SUCH DAMAGE.</span></div>
<divclass="line"><aname="l00213"></a><spanclass="lineno"> 213</span> <spanclass="comment"> * Write some bytes to the given data buffer, this function is used in Big Endian cpus.</span></div>
<divclass="line"><aname="l00214"></a><spanclass="lineno"> 214</span> <spanclass="comment"> * @param p_buffer pointer the data buffer to write data to.</span></div>
<divclass="line"><aname="l00215"></a><spanclass="lineno"> 215</span> <spanclass="comment"> * @param p_value the value to write</span></div>
<divclass="line"><aname="l00255"></a><spanclass="lineno"> 255</span> <spanclass="comment"> * Write some bytes to the given data buffer, this function is used in Big Endian cpus.</span></div>
<divclass="line"><aname="l00256"></a><spanclass="lineno"> 256</span> <spanclass="comment"> * @param p_buffer pointer the data buffer to write data to.</span></div>
<divclass="line"><aname="l00257"></a><spanclass="lineno"> 257</span> <spanclass="comment"> * @param p_value the value to write</span></div>
<divclass="ttc"id="structopj__stream__private_html_a326f2fe5dc1fccce2788bf09ddf4931c"><divclass="ttname"><ahref="structopj__stream__private.html#a326f2fe5dc1fccce2788bf09ddf4931c">opj_stream_private::m_user_data</a></div><divclass="ttdeci">void * m_user_data</div><divclass="ttdoc">User data, be it files, ... </div><divclass="ttdef"><b>Definition:</b> cio.h:86</div></div>
<divclass="ttc"id="group___c_i_o_html_ga5c59a39f3664f9deb654c269153c600a"><divclass="ttname"><ahref="group___c_i_o.html#ga5c59a39f3664f9deb654c269153c600a">opj_stream_tell</a></div><divclass="ttdeci">OPJ_OFF_T opj_stream_tell(const opj_stream_private_t *p_stream)</div><divclass="ttdoc">Tells the byte offset on the stream (similar to ftell). </div><divclass="ttdef"><b>Definition:</b> cio.c:544</div></div>
<divclass="ttc"id="group___c_i_o_html_ga6102b5a73d4a0235e9cfa65d92a623dc"><divclass="ttname"><ahref="group___c_i_o.html#ga6102b5a73d4a0235e9cfa65d92a623dc">opj_stream_read_data</a></div><divclass="ttdeci">OPJ_SIZE_T opj_stream_read_data(opj_stream_private_t *p_stream, OPJ_BYTE *p_buffer, OPJ_SIZE_T p_size, struct opj_event_mgr *p_event_mgr)</div><divclass="ttdoc">Reads some bytes from the stream. </div><divclass="ttdef"><b>Definition:</b> cio.c:266</div></div>
<divclass="ttc"id="structopj__stream__private_html_aacd57b4e429ddf5ca3a4913a2f963d6a"><divclass="ttname"><ahref="structopj__stream__private.html#aacd57b4e429ddf5ca3a4913a2f963d6a">opj_stream_private::m_write_fn</a></div><divclass="ttdeci">opj_stream_write_fn m_write_fn</div><divclass="ttdoc">Pointer to actual write function (NULL at the initialization of the cio. </div><divclass="ttdef"><b>Definition:</b> cio.h:108</div></div>
<divclass="ttc"id="group___c_i_o_html_ga7dc74eec9e8e6227d485ef36396c57d8"><divclass="ttname"><ahref="group___c_i_o.html#ga7dc74eec9e8e6227d485ef36396c57d8">opj_stream_read_seek</a></div><divclass="ttdeci">OPJ_BOOL opj_stream_read_seek(opj_stream_private_t *p_stream, OPJ_OFF_T p_size, struct opj_event_mgr *p_event_mgr)</div><divclass="ttdoc">Skips a number of bytes from the stream. </div><divclass="ttdef"><b>Definition:</b> cio.c:564</div></div>
<divclass="ttc"id="structopj__event__mgr_html"><divclass="ttname"><ahref="structopj__event__mgr.html">opj_event_mgr</a></div><divclass="ttdoc">Message handler object used for. </div><divclass="ttdef"><b>Definition:</b> event.h:50</div></div>
<divclass="ttc"id="group___c_i_o_html_ga01c575d71f35eb2eb2d0494567a11857"><divclass="ttname"><ahref="group___c_i_o.html#ga01c575d71f35eb2eb2d0494567a11857">opj_read_float_LE</a></div><divclass="ttdeci">void opj_read_float_LE(const OPJ_BYTE *p_buffer, OPJ_FLOAT32 *p_value)</div><divclass="ttdoc">Reads some bytes from the given data buffer, this function is used in Little Endian cpus...</div><divclass="ttdef"><b>Definition:</b> cio.c:142</div></div>
<divclass="ttc"id="structopj__stream__private_html_a83e54b51fe859e0aa93ebf292edf054c"><divclass="ttname"><ahref="structopj__stream__private.html#a83e54b51fe859e0aa93ebf292edf054c">opj_stream_private::m_buffer_size</a></div><divclass="ttdeci">OPJ_SIZE_T m_buffer_size</div><divclass="ttdoc">The size of the buffer. </div><divclass="ttdef"><b>Definition:</b> cio.h:155</div></div>
<divclass="ttc"id="structopj__stream__private_html_a262bea0d39f7c5a0bd5ef07434e38723"><divclass="ttname"><ahref="structopj__stream__private.html#a262bea0d39f7c5a0bd5ef07434e38723">opj_stream_private::m_free_user_data_fn</a></div><divclass="ttdeci">opj_stream_free_user_data_fn m_free_user_data_fn</div><divclass="ttdoc">Pointer to function to free m_user_data (NULL at initialization) when destroying the stream...</div><divclass="ttdef"><b>Definition:</b> cio.h:93</div></div>
<divclass="ttc"id="group___c_i_o_html_ga092c8153f29a4137728c6d79165c7e51"><divclass="ttname"><ahref="group___c_i_o.html#ga092c8153f29a4137728c6d79165c7e51">opj_stream_read_skip</a></div><divclass="ttdeci">OPJ_OFF_T opj_stream_read_skip(opj_stream_private_t *p_stream, OPJ_OFF_T p_size, struct opj_event_mgr *p_event_mgr)</div><divclass="ttdoc">Skips a number of bytes from the stream. </div><divclass="ttdef"><b>Definition:</b> cio.c:450</div></div>
<divclass="ttc"id="group___c_i_o_html_ga9061d0624a17af80b74e1a114b0c7f06"><divclass="ttname"><ahref="group___c_i_o.html#ga9061d0624a17af80b74e1a114b0c7f06">opj_stream_seek</a></div><divclass="ttdeci">OPJ_BOOL opj_stream_seek(opj_stream_private_t *p_stream, OPJ_OFF_T p_size, struct opj_event_mgr *p_event_mgr)</div><divclass="ttdoc">Seeks a number of bytes from the stream. </div><divclass="ttdef"><b>Definition:</b> cio.c:605</div></div>
<divclass="ttc"id="structopj__stream__private_html_ac2b84e72997fde0bf510faf6c8df5798"><divclass="ttname"><ahref="structopj__stream__private.html#ac2b84e72997fde0bf510faf6c8df5798">opj_stream_private::m_status</a></div><divclass="ttdeci">OPJ_UINT32 m_status</div><divclass="ttdoc">Flags to tell the status of the stream. </div><divclass="ttdef"><b>Definition:</b> cio.h:161</div></div>
<divclass="ttc"id="group___c_i_o_html_ga9e71a30be5af724e31c50066b7ff1128"><divclass="ttname"><ahref="group___c_i_o.html#ga9e71a30be5af724e31c50066b7ff1128">opj_stream_write_skip</a></div><divclass="ttdeci">OPJ_OFF_T opj_stream_write_skip(opj_stream_private_t *p_stream, OPJ_OFF_T p_size, struct opj_event_mgr *p_event_mgr)</div><divclass="ttdoc">Skips a number of bytes from the stream. </div><divclass="ttdef"><b>Definition:</b> cio.c:504</div></div>
<divclass="ttc"id="group___c_i_o_html_gaa87066c3ad9c71a3b2e7725d111188b9"><divclass="ttname"><ahref="group___c_i_o.html#gaa87066c3ad9c71a3b2e7725d111188b9">opj_stream_write_seek</a></div><divclass="ttdeci">OPJ_BOOL opj_stream_write_seek(opj_stream_private_t *p_stream, OPJ_OFF_T p_size, struct opj_event_mgr *p_event_mgr)</div><divclass="ttdoc">Skips a number of bytes from the stream. </div><divclass="ttdef"><b>Definition:</b> cio.c:584</div></div>
<divclass="ttc"id="group___c_i_o_html_gaf273fa2d61cb73738877a811e689dc88"><divclass="ttname"><ahref="group___c_i_o.html#gaf273fa2d61cb73738877a811e689dc88">opj_read_bytes_LE</a></div><divclass="ttdeci">void opj_read_bytes_LE(const OPJ_BYTE *p_buffer, OPJ_UINT32 *p_value, OPJ_UINT32 p_nb_bytes)</div><divclass="ttdoc">Reads some bytes from the given data buffer, this function is used in Little Endian cpus...</div><divclass="ttdef"><b>Definition:</b> cio.c:78</div></div>
<divclass="ttc"id="structopj__stream__private_html_a2ca719761a9cd88dc350486e38b41790"><divclass="ttname"><ahref="structopj__stream__private.html#a2ca719761a9cd88dc350486e38b41790">opj_stream_private::m_skip_fn</a></div><divclass="ttdeci">opj_stream_skip_fn m_skip_fn</div><divclass="ttdoc">Pointer to actual skip function (NULL at the initialization of the cio. </div><divclass="ttdef"><b>Definition:</b> cio.h:114</div></div>
<divclass="ttc"id="structopj__stream__private_html_acce2d2187feff70fa3057b0439591f76"><divclass="ttname"><ahref="structopj__stream__private.html#acce2d2187feff70fa3057b0439591f76">opj_stream_private::m_read_fn</a></div><divclass="ttdeci">opj_stream_read_fn m_read_fn</div><divclass="ttdoc">Pointer to actual read function (NULL at the initialization of the cio. </div><divclass="ttdef"><b>Definition:</b> cio.h:103</div></div>
<divclass="ttc"id="group___c_i_o_html_ga8a8ab9c9e1ccdc20a6dd2a2925a3f8c0"><divclass="ttname"><ahref="group___c_i_o.html#ga8a8ab9c9e1ccdc20a6dd2a2925a3f8c0">opj_stream_skip</a></div><divclass="ttdeci">OPJ_OFF_T opj_stream_skip(opj_stream_private_t *p_stream, OPJ_OFF_T p_size, struct opj_event_mgr *p_event_mgr)</div><divclass="ttdoc">Skips a number of bytes from the stream. </div><divclass="ttdef"><b>Definition:</b> cio.c:558</div></div>
<divclass="ttc"id="group___c_i_o_html_gaf4f59dfe6fc6cb0d93ccf308e81727d3"><divclass="ttname"><ahref="group___c_i_o.html#gaf4f59dfe6fc6cb0d93ccf308e81727d3">opj_read_double_BE</a></div><divclass="ttdeci">void opj_read_double_BE(const OPJ_BYTE *p_buffer, OPJ_FLOAT64 *p_value)</div><divclass="ttdoc">Reads some bytes from the given data buffer, this function is used in Big Endian cpus. </div><divclass="ttdef"><b>Definition:</b> cio.c:106</div></div>
<divclass="ttc"id="group___c_i_o_html_gac1a8582ea72e8bfdf744b5af0b73863d"><divclass="ttname"><ahref="group___c_i_o.html#gac1a8582ea72e8bfdf744b5af0b73863d">opj_write_float_LE</a></div><divclass="ttdeci">void opj_write_float_LE(OPJ_BYTE *p_buffer, OPJ_FLOAT32 p_value)</div><divclass="ttdoc">Write some bytes to the given data buffer, this function is used in Little Endian cpus...</div><divclass="ttdef"><b>Definition:</b> cio.c:127</div></div>
<divclass="ttc"id="structopj__stream__private_html_a8bbf688a608e52a52d1cf89c7103ac5b"><divclass="ttname"><ahref="structopj__stream__private.html#a8bbf688a608e52a52d1cf89c7103ac5b">opj_stream_private::m_bytes_in_buffer</a></div><divclass="ttdeci">OPJ_SIZE_T m_bytes_in_buffer</div><divclass="ttdoc">number of bytes containing in the buffer. </div><divclass="ttdef"><b>Definition:</b> cio.h:145</div></div>
<divclass="ttc"id="group___c_i_o_html_ga9f901a48ea910d97ff038f87d9256037"><divclass="ttname"><ahref="group___c_i_o.html#ga9f901a48ea910d97ff038f87d9256037">opj_read_bytes_BE</a></div><divclass="ttdeci">void opj_read_bytes_BE(const OPJ_BYTE *p_buffer, OPJ_UINT32 *p_value, OPJ_UINT32 p_nb_bytes)</div><divclass="ttdoc">Reads some bytes from the given data buffer, this function is used in Big Endian cpus. </div><divclass="ttdef"><b>Definition:</b> cio.c:68</div></div>
<divclass="ttc"id="group___c_i_o_html_ga3cb2e53726d5dde5a5f97f64a9e5f42d"><divclass="ttname"><ahref="group___c_i_o.html#ga3cb2e53726d5dde5a5f97f64a9e5f42d">opj_stream_flush</a></div><divclass="ttdeci">OPJ_BOOL opj_stream_flush(opj_stream_private_t *p_stream, struct opj_event_mgr *p_event_mgr)</div><divclass="ttdoc">Writes the content of the stream buffer to the stream. </div><divclass="ttdef"><b>Definition:</b> cio.c:421</div></div>
<divclass="ttc"id="structopj__stream__private_html_a5c0c669ab30776a58afc458b7f33a75b"><divclass="ttname"><ahref="structopj__stream__private.html#a5c0c669ab30776a58afc458b7f33a75b">opj_stream_private::m_byte_offset</a></div><divclass="ttdeci">OPJ_OFF_T m_byte_offset</div><divclass="ttdoc">The number of bytes read/written from the beginning of the stream. </div><divclass="ttdef"><b>Definition:</b> cio.h:150</div></div>
<divclass="ttc"id="structopj__stream__private_html_aca072a59b683dc106263ba04d3c28577"><divclass="ttname"><ahref="structopj__stream__private.html#aca072a59b683dc106263ba04d3c28577">opj_stream_private::m_stored_data</a></div><divclass="ttdeci">OPJ_BYTE * m_stored_data</div><divclass="ttdoc">Actual data stored into the stream if readed from. </div><divclass="ttdef"><b>Definition:</b> cio.h:125</div></div>
<divclass="ttc"id="structopj__stream__private_html_a53cb7b3992a382231554bdc73cb0c7bd"><divclass="ttname"><ahref="structopj__stream__private.html#a53cb7b3992a382231554bdc73cb0c7bd">opj_stream_private::m_user_data_length</a></div><divclass="ttdeci">OPJ_UINT64 m_user_data_length</div><divclass="ttdoc">User data length. </div><divclass="ttdef"><b>Definition:</b> cio.h:98</div></div>
<divclass="ttc"id="group___c_i_o_html_gae3c5b5fac8489e8fb4d1caecc98a8788"><divclass="ttname"><ahref="group___c_i_o.html#gae3c5b5fac8489e8fb4d1caecc98a8788">opj_read_float_BE</a></div><divclass="ttdeci">void opj_read_float_BE(const OPJ_BYTE *p_buffer, OPJ_FLOAT32 *p_value)</div><divclass="ttdoc">Reads some bytes from the given data buffer, this function is used in Big Endian cpus. </div><divclass="ttdef"><b>Definition:</b> cio.c:136</div></div>
<divclass="ttc"id="group___c_i_o_html_gae456419611db729983d8ca337e3f3293"><divclass="ttname"><ahref="group___c_i_o.html#gae456419611db729983d8ca337e3f3293">opj_stream_has_seek</a></div><divclass="ttdeci">OPJ_BOOL opj_stream_has_seek(const opj_stream_private_t *p_stream)</div><divclass="ttdoc">Tells if the given stream is seekable. </div><divclass="ttdef"><b>Definition:</b> cio.c:611</div></div>
<divclass="ttc"id="group___c_i_o_html_ga28ef412ebe86af560a05f44816b8c601"><divclass="ttname"><ahref="group___c_i_o.html#ga28ef412ebe86af560a05f44816b8c601">opj_write_bytes_LE</a></div><divclass="ttdeci">void opj_write_bytes_LE(OPJ_BYTE *p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_nb_bytes)</div><divclass="ttdoc">Write some bytes to the given data buffer, this function is used in Little Endian cpus...</div><divclass="ttdef"><b>Definition:</b> cio.c:56</div></div>
<divclass="ttc"id="group___c_i_o_html_gadae00135fe98bea16876125f0898759a"><divclass="ttname"><ahref="group___c_i_o.html#gadae00135fe98bea16876125f0898759a">opj_read_double_LE</a></div><divclass="ttdeci">void opj_read_double_LE(const OPJ_BYTE *p_buffer, OPJ_FLOAT64 *p_value)</div><divclass="ttdoc">Reads some bytes from the given data buffer, this function is used in Little Endian cpus...</div><divclass="ttdef"><b>Definition:</b> cio.c:112</div></div>
<divclass="ttc"id="group___c_i_o_html_gad2083292c9469ca4a135521524784f89"><divclass="ttname"><ahref="group___c_i_o.html#gad2083292c9469ca4a135521524784f89">opj_write_double_LE</a></div><divclass="ttdeci">void opj_write_double_LE(OPJ_BYTE *p_buffer, OPJ_FLOAT64 p_value)</div><divclass="ttdoc">Write some bytes to the given data buffer, this function is used in Little Endian cpus...</div><divclass="ttdef"><b>Definition:</b> cio.c:97</div></div>
<divclass="ttc"id="group___c_i_o_html_gaec7225a845169469fd1aa8db2a3fac9e"><divclass="ttname"><ahref="group___c_i_o.html#gaec7225a845169469fd1aa8db2a3fac9e">opj_stream_get_number_byte_left</a></div><divclass="ttdeci">OPJ_OFF_T opj_stream_get_number_byte_left(const opj_stream_private_t *p_stream)</div><divclass="ttdoc">Get the number of bytes left before the end of the stream (similar to cio_numbytesleft). </div><divclass="ttdef"><b>Definition:</b> cio.c:549</div></div>
<divclass="ttc"id="group___c_i_o_html_gaa94d0663a3de41683f3635114eb42eed"><divclass="ttname"><ahref="group___c_i_o.html#gaa94d0663a3de41683f3635114eb42eed">opj_write_bytes_BE</a></div><divclass="ttdeci">void opj_write_bytes_BE(OPJ_BYTE *p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_nb_bytes)</div><divclass="ttdoc">Write some bytes to the given data buffer, this function is used in Big Endian cpus. </div><divclass="ttdef"><b>Definition:</b> cio.c:47</div></div>
<divclass="ttc"id="structopj__stream__private_html_adab26f9f0a32253aefdce763331c641a"><divclass="ttname"><ahref="structopj__stream__private.html#adab26f9f0a32253aefdce763331c641a">opj_stream_private::m_seek_fn</a></div><divclass="ttdeci">opj_stream_seek_fn m_seek_fn</div><divclass="ttdoc">Pointer to actual seek function (if available). </div><divclass="ttdef"><b>Definition:</b> cio.h:119</div></div>
<divclass="ttc"id="structopj__stream__private_html_a954a54c078a817c3eeffd66b45419cfc"><divclass="ttname"><ahref="structopj__stream__private.html#a954a54c078a817c3eeffd66b45419cfc">opj_stream_private::m_current_data</a></div><divclass="ttdeci">OPJ_BYTE * m_current_data</div><divclass="ttdoc">Pointer to the current read data. </div><divclass="ttdef"><b>Definition:</b> cio.h:130</div></div>