Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::GZipFileOutputStream Class Reference

GZip file output stream (compression) More...

#include <GZipFileOutputStream.h>

Inheritance diagram for sese::GZipFileOutputStream:
sese::io::OutputStream

Public Types

using Ptr = std::shared_ptr<GZipFileOutputStream>
 
- Public Types inherited from sese::io::OutputStream
typedef std::shared_ptr< OutputStreamPtr
 

Public Member Functions

int64_t write (const void *buffer, size_t length) override
 
void close () noexcept
 
- Public Member Functions inherited from sese::io::OutputStream
virtual ~OutputStream () noexcept=default
 
int64_t write (const std::string_view &buffer)
 
int64_t write (const text::StringView &buffer)
 
template<typename T >
int64_t write (std::vector< T > &buffer)
 
template<typename T , size_t N>
int64_t write (std::array< T, N > &buffer)
 

Static Public Member Functions

static void deleter (GZipFileOutputStream *data) noexcept
 
static GZipFileOutputStream::Ptr create (const char *file, size_t level) noexcept
 

Private Member Functions

 GZipFileOutputStream ()=default
 

Private Attributes

void * gzFile = nullptr
 

Detailed Description

GZip file output stream (compression)

Member Typedef Documentation

◆ Ptr

Constructor & Destructor Documentation

◆ GZipFileOutputStream()

sese::GZipFileOutputStream::GZipFileOutputStream ( )
privatedefault

Member Function Documentation

◆ close()

void sese::GZipFileOutputStream::close ( )
noexcept

◆ create()

sese::GZipFileOutputStream::Ptr sese::GZipFileOutputStream::create ( const char * file,
size_t level )
staticnoexcept

Create file output stream object

Parameters
fileRelative or absolute path of the file
levelCompression level (range 0-9, automatically handles value range)
Return values
nullptrFailed to open file

References gzFile.

◆ deleter()

void sese::GZipFileOutputStream::deleter ( GZipFileOutputStream * data)
staticnoexcept

◆ write()

int64_t sese::GZipFileOutputStream::write ( const void * buffer,
size_t length )
overridevirtual

Implements sese::io::OutputStream.

References gzFile.

Member Data Documentation

◆ gzFile

void* sese::GZipFileOutputStream::gzFile = nullptr
private

Referenced by create(), and write().


The documentation for this class was generated from the following files: