14 # define _SCL_SECURE_NO_WARNINGS 20 #if MRPT_HAS_GZ_STREAMS 24 #define THE_GZFILE reinterpret_cast<gzFile>(m_f) 53 bool CFileGZOutputStream::open(
const string &fileName,
int compress_level )
60 m_f = gzopen(fileName.c_str(),
format(
"wb%i",compress_level).c_str() );
69 CFileGZOutputStream::~CFileGZOutputStream()
77 void CFileGZOutputStream::close()
90 size_t CFileGZOutputStream::Read(
void *Buffer,
size_t Count)
100 size_t CFileGZOutputStream::Write(
const void *Buffer,
size_t Count)
103 return gzwrite(
THE_GZFILE,const_cast<void*>(Buffer),Count);
109 uint64_t CFileGZOutputStream::getPosition()
118 bool CFileGZOutputStream::fileOpenCorrectly()
123 #endif // MRPT_HAS_GZ_STREAMS Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
#define THROW_EXCEPTION(msg)
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
std::string BASE_IMPEXP format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
unsigned __int64 uint64_t
#define CFileGZOutputStream
Saves data to a file and transparently compress the data using the given compression level...