.. index:: pair: class; EE::System::IOStreamDeflate .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_deflate: class EE::System::IOStreamDeflate ================================= .. toctree:: :hidden: Overview ~~~~~~~~ Implementation of a deflating stream. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class IOStreamDeflate: public :ref:`EE::System::IOStream` { public: // construction :ref:`IOStreamDeflate`(:ref:`IOStream`& inOutStream, :ref:`Compression::Mode` mode, const :ref:`Compression::Config`& config = :ref:`Compression::Config`()); virtual :target:`~IOStreamDeflate`(); // methods static IOStreamDeflate* :target:`New`(:ref:`IOStream`& inOutStream, :ref:`Compression::Mode` mode, const :ref:`Compression::Config`& config = :ref:`Compression::Config`()); virtual :ref:`ios_size` :ref:`read`(char* data, :ref:`ios_size` size); virtual :ref:`ios_size` :ref:`write`(const char* data, :ref:`ios_size` size); virtual :ref:`ios_size` :ref:`seek`(:ref:`ios_size` position); virtual :ref:`ios_size` :ref:`tell`(); virtual :ref:`ios_size` :ref:`getSize`(); virtual bool :ref:`isOpen`(); const :ref:`Compression::Mode`& :target:`getMode`() const; }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // methods virtual :ref:`ios_size` :ref:`read`(char* data, :ref:`ios_size` size) = 0; virtual :ref:`ios_size` :ref:`write`(const char* data, :ref:`ios_size` size) = 0; virtual :ref:`ios_size` :ref:`seek`(:ref:`ios_size` position) = 0; virtual :ref:`ios_size` :ref:`tell`() = 0; virtual :ref:`ios_size` :ref:`getSize`() = 0; virtual bool :ref:`isOpen`() = 0; .. _details-class_e_e_1_1_system_1_1_i_o_stream_deflate: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Implementation of a deflating stream. Construction ------------ .. index:: pair: function; IOStreamDeflate .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_deflate_1a7f3d22fd4634888cef6e9afcbcb5a0d1: .. ref-code-block:: cpp :class: doxyrest-title-code-block IOStreamDeflate(:ref:`IOStream`& inOutStream, :ref:`Compression::Mode` mode, const :ref:`Compression::Config`& config = :ref:`Compression::Config`()) Use a stream as a input or output buffer. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - inOutStream - Stream where the results will ve loaded or saved. It must be used only for reading or writing, can't mix both calls. * - mode - :ref:`Compression ` method used * - config - :ref:`Compression ` configuration Methods ------- .. index:: pair: function; read .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_deflate_1a9b776152f0cf5fd2b0c958fb047bf6d4: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` read(char* data, :ref:`ios_size` size) Read data from the stream. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - data - Buffer where to copy the read data * - size - Desired number of bytes to read .. rubric:: Returns: The number of bytes actually read .. index:: pair: function; write .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_deflate_1ab886e9a721bc783c5d2c539e5a77c75c: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` write(const char* data, :ref:`ios_size` size) Write data to the virtual file. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - data - Data to write in the file * - size - Size of the data that needs to be writed .. index:: pair: function; seek .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_deflate_1a7d7b1dcb26f0aaaf18c2bd5615b53f86: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` seek(:ref:`ios_size` position) Change the current reading position. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - position - The position to seek to, from the beginning .. rubric:: Returns: The position actually sought to. .. index:: pair: function; tell .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_deflate_1add8d3c3c0ea921c531b400a618f2c1d4: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` tell() Get the current reading position in the stream. .. rubric:: Returns: The current position, or -1 on error. .. index:: pair: function; getSize .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_deflate_1aae5f5628be653db31b280bf21ee5ec98: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` getSize() Return the size of the stream. .. rubric:: Returns: The total number of bytes available in the stream .. index:: pair: function; isOpen .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_deflate_1a0017f3ce9f76cbbfdcf95e8172054672: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual bool isOpen() .. rubric:: Returns: If the virtual stream file is open