# Template Class basic_ogzip_streambuf

- Defined in File gzio.hpp

## Inheritance Relationships

### Base Type

- `public cif::gzio::basic_streambuf< CharT, Traits >` (Template Class basic_streambuf)

## Class Documentation

template<typename CharT, typename Traits, std::size_t BufferSize = kDefaultBufferSize>
class basic_ogzip_streambuf : public cif::gzio::basic_streambuf<CharT, Traits>

  A streambuf class that can be used to compress data using zlib.

  This implementation of streambuf can compress (deflate) data using zlib.

  Template Parameters:

    - CharT – Type of the character stream.

    - Traits – Traits for character type, defaults to char_traits<_CharT>.

    - BufferSize – The size of the internal buffers.

  Public Functions

  inline basic_ogzip_streambuf &operator=(basic_ogzip_streambuf &&rhs)

    Move operator=.

  inline ~basic_ogzip_streambuf() override
  inline base_type *close() override

    This closes the zlib stream and sets the put pointers to null.

  inline base_type *init(streambuf_type *upstream) override

    Initialize the internal zlib structures.

    The zlib stream is initialized as one that can accept a gzip header.

    Parameters:

      upstream – The upstream streambuf