1 #ifndef UTIL_COMPRESS__STREAM_UTIL__HPP
2 #define UTIL_COMPRESS__STREAM_UTIL__HPP
125 static bool HaveSupport(EMethod method);
294 if (stream.GetError(status, description)) {
337 template <
class TInputStream,
class TOutputStream>
353 "CManipulatorProxy:: NcbiStreamCopy() failed");
394 template <
class TInputStream,
class TOutputStream>
410 "CManipulatorProxy:: NcbiStreamCopy() failed");
434 status = os.GetStatus();
456 status = os.GetStatus();
506 #define MCompress_BZip2 MCompress_Proxy_BZip2()
507 #define MCompress_LZO MCompress_Proxy_LZO()
508 #define MCompress_Zip MCompress_Proxy_Zip()
509 #define MCompress_GZipFile MCompress_Proxy_GZipFile()
510 #define MCompress_ZipCloudflare MCompress_Proxy_ZipCloudflare()
511 #define MCompress_GZipCloudflareFile MCompress_Proxy_GZipCloudflareFile()
512 #define MCompress_Zstd MCompress_Proxy_Zstd()
513 #define MDecompress_BZip2 MDecompress_Proxy_BZip2()
514 #define MDecompress_LZO MDecompress_Proxy_LZO()
515 #define MDecompress_Zip MDecompress_Proxy_Zip()
516 #define MDecompress_GZipFile MDecompress_Proxy_GZipFile()
517 #define MDecompress_ConcatenatedGZipFile MDecompress_Proxy_ConcatenatedGZipFile()
518 #define MDecompress_ZipCloudflare MDecompress_Proxy_ZipCloudflare()
519 #define MDecompress_GZipCloudflareFile MDecompress_Proxy_GZipCloudflareFile()
520 #define MDecompress_Zstd MDecompress_Proxy_Zstd()
CManipulatorIProxy – base class for manipulators using in operator>>.
CManipulatorOProxy – base class for manipulators using in operator<<.
Classes that we actually put on the stream when using manipulators.
static const char * str(char *buf, int n)
@ eNoOwnership
No ownership is assumed.
CManipulatorIProxy< CCompressIStream, CCompressOStream > TCompressIProxy
Type of compression manipulators for operator>>
CManipulatorIProxy< CDecompressIStream, CDecompressOStream > TDecompressIProxy
Type of decompression manipulators for operator>>
void operator>>(CNcbiIstream &stream) const
Disable using input stream as parameter for manipulator.
EMethod
Compression/decompression methods.
CNcbiOstream & operator<<(const string &str) const
The << operator for string.
void operator<<(CNcbiOstream &stream) const
Disable using output stream as parameter for manipulator.
CNcbiOstream & operator<<(const char *str) const
The << operator for char*.
string g_GetManipulatorError(T &stream)
Auxiliary function to get manipulator error.
CNcbiOstream & operator<<(CNcbiIstream &stream) const
The << operator for input streams.
CNcbiOstream & m_Stream
Main output stream.
CManipulatorOProxy< CCompressIStream, CCompressOStream > TCompressOProxy
Type of compression manipulators for operator<<.
CManipulatorOProxy(CNcbiOstream &stream, CCompressStream::EMethod method)
Constructor.
CCompressStream::EMethod m_Method
Compression/decompression method.
CNcbiIstream & operator>>(CNcbiOstream &stream) const
The >> operator for stream.
TCompressOProxy operator<<(ostream &os, MCompress_Proxy_BZip2 const &)
CManipulatorOProxy< CDecompressIStream, CDecompressOStream > TDecompressOProxy
Type of decompression manipulators for operator<<.
CNcbiIstream & m_Stream
Main stream.
CManipulatorIProxy(CNcbiIstream &stream, CCompressStream::EMethod method)
Constructor.
TCompressIProxy operator>>(istream &is, MCompress_Proxy_BZip2 const &)
EDefaultFlags
Default algorithm-specific compression/decompression flags.
CCompressStream::EMethod m_Method
Compression/decompression method.
CNcbiIstream & operator>>(string &value) const
The >> operator for string.
@ eZip
ZLIB (raw zip data / DEFLATE method)
@ eGZipCloudflareFile
.gz file (including concatenated files) Cloudflare fork
@ eZipCloudflare
ZLIB (raw zip data / DEFLATE method) Cloudflare fork.
@ eNone
no compression method (copy "as is")
@ eZstd
ZStandard (raw zstd data)
@ eConcatenatedGZipFile
Synonym for eGZipFile (for backward compatibility) - deprecated.
@ eGZipFile
.gz file (including concatenated files)
unsigned int TFlags
Compression flags.
EStatus
Type of the result of all basic functions.
@ eStatus_Error
Error has occurred. The error code can be acquired by GetErrorCode().
@ eStatus_EndOfData
Special case of eStatus_Success.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
bool NcbiStreamCopy(CNcbiOstream &os, CNcbiIstream &is)
Copy the entire contents of stream "is" to stream "os".
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
ENcbiOwnership
Ownership relations between objects.
const GenericPointer< typename T::ValueType > T2 value
Front end for a platform-specific configuration summary.
NCBI_XUTIL_EXPORT
Parameter to control printing diagnostic message about conversion of static array data from a differe...
ZLib Compression API - Cloudflare ZLIB wrapper (https://github.com/cloudflare/zlib)
Zstandard (zstd) Compression API.