<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="l00006"></a><spanclass="lineno"> 6</span> <spanclass="comment"> *</span></div><divclass="line"><aname="l00007"></a><spanclass="lineno"> 7</span> <spanclass="comment"> * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium</span></div><divclass="line"><aname="l00008"></a><spanclass="lineno"> 8</span> <spanclass="comment"> * Copyright (c) 2002-2014, Professor Benoit Macq</span></div><divclass="line"><aname="l00009"></a><spanclass="lineno"> 9</span> <spanclass="comment"> * Copyright (c) 2001-2003, David Janssens</span></div><divclass="line"><aname="l00010"></a><spanclass="lineno"> 10</span> <spanclass="comment"> * Copyright (c) 2002-2003, Yannick Verschueren</span></div><divclass="line"><aname="l00011"></a><spanclass="lineno"> 11</span> <spanclass="comment"> * Copyright (c) 2003-2007, Francois-Olivier Devaux</span></div><divclass="line"><aname="l00012"></a><spanclass="lineno"> 12</span> <spanclass="comment"> * Copyright (c) 2003-2014, Antonin Descampe</span></div><divclass="line"><aname="l00013"></a><spanclass="lineno"> 13</span> <spanclass="comment"> * Copyright (c) 2005, Herve Drolon, FreeImage Team</span></div><divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="comment"> * Copyright (c) 2008, 2011-2012, Centre National d'Etudes Spatiales (CNES), FR</span></div><divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> <spanclass="comment"> * Copyright (c) 2012, CS Systemes d'Information, France</span></div><divclass="line"><aname="l00016"></a><spanclass="lineno"> 16</span> <spanclass="comment"> * All rights reserved.</span></div><divclass="line"><aname="l00017"></a><spanclass="lineno"> 17</span> <spanclass="comment"> *</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> 
<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:579</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:281</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:107</div></div>
<divclass="ttc"id="group___c_i_o_html_ga8f590493a14f4e33a1e2bbcf8eaa889d"><divclass="ttname"><ahref="group___c_i_o.html#ga8f590493a14f4e33a1e2bbcf8eaa889d">opj_stream_write_data</a></div><divclass="ttdeci">OPJ_SIZE_T opj_stream_write_data(opj_stream_private_t *p_stream, const OPJ_BYTE *p_buffer, OPJ_SIZE_T p_size, struct opj_event_mgr *p_event_mgr)</div><divclass="ttdoc">Writes some bytes to the stream. </div><divclass="ttdef"><b>Definition:</b> cio.c:385</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:600</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:149</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:156</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:92</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:463</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:641</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:162</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:538</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:620</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:82</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:113</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:102</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:593</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:112</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:133</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:146</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:71</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:433</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:151</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:124</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:97</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:143</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:648</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:58</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:118</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:102</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:584</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:118</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:129</div></div>