Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:11

0001 /* This Source Code Form is subject to the terms of the Mozilla Public
0002  * License, v. 2.0. If a copy of the MPL was not distributed with this
0003  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
0004  *
0005  * This file is a part of bxzstr (https://github.com/tmaklin/bxzstr)
0006  * Written by Tommi Mäklin (tommi@maklin.fi) */
0007 
0008 #ifndef BXZSTR_STREAM_WRAPPER_HPP
0009 #define BXZSTR_STREAM_WRAPPER_HPP
0010 
0011 namespace bxz {
0012 namespace detail {
0013 class stream_wrapper {
0014   private:
0015   public:
0016     stream_wrapper() {};
0017     stream_wrapper(const bool _isInput, const int _level, const int _flags);
0018     virtual ~stream_wrapper() = default;
0019     virtual int decompress(const int _flags = 0) =0;
0020     virtual int compress(const int _flags = 0) =0;
0021     virtual bool stream_end() const =0;
0022     virtual bool done() const =0;
0023 
0024     virtual const uint8_t* next_in() const =0;
0025     virtual long avail_in() const =0;
0026     virtual uint8_t* next_out() const =0;
0027     virtual long avail_out() const =0;
0028 
0029     virtual void set_next_in(const unsigned char* in) =0;
0030     virtual void set_avail_in(const long in) =0;
0031     virtual void set_next_out(const uint8_t* in) =0;
0032     virtual void set_avail_out(const long in) =0;
0033 };
0034 } // namespace detail
0035 } // namespace bxz
0036 
0037 #endif