NCBI C++ ToolKit
stream_util.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef UTIL_COMPRESS__STREAM_UTIL__HPP
2 #define UTIL_COMPRESS__STREAM_UTIL__HPP
3 
4 /* $Id: stream_util.hpp 101282 2023-11-27 15:13:23Z ivanov $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Author: Vladimir Ivanov
30  *
31  */
32 
33 /// @file stream_util.hpp
34 /// C++ I/O stream wrappers to compress/decompress data on-the-fly.
35 ///
36 /// CCompressIStream - input compression stream.
37 /// CCompressOStream - output compression stream.
38 /// CDecompressIStream - input decompression stream.
39 /// CDecompressOStream - output decompression stream.
40 ///
41 /// Compression/decompression manipulators:
42 /// MCompress_BZip2, MDecompress_BZip2
43 /// MCompress_LZO, MDecompress_LZO
44 /// MCompress_Zip, MDecompress_Zip
45 /// MCompress_GZipFile, MDecompress_GZipFile,
46 /// MDecompress_ConcatenatedGZipFile
47 /// MCompress_ZipCloudflare, MDecompress_ZipCloudflare
48 /// MCompress_GZipCloudflareFile, MDecompress_GZipCloudflareFile,
49 /// MCompress_Zstd, MDecompress_Zstd
50 ///
51 /// @note
52 /// The stream wrappers and manipulators doesn't support setting
53 /// advanced compression parameters or using dictionaries. You neeed
54 /// to create stream using algorithm-specific stream processor and
55 /// tune up all necessary parameters there.
56 /// See 'stream.hpp': CCompression[IO]Stream.
57 
58 
59 #include <util/compress/stream.hpp>
60 #include <ncbiconf.h>
61 #include <util/compress/bzip2.hpp>
62 #include <util/compress/lzo.hpp>
63 #include <util/compress/zlib.hpp>
65 #include <util/compress/zstd.hpp>
66 
67 
68 /** @addtogroup CompressionStreams
69  *
70  * @{
71  */
72 
74 
75 
76 /////////////////////////////////////////////////////////////////////////////
77 ///
78 /// CCompressStream --
79 ///
80 /// Base stream class to hold common definitions and methods.
81 
83 {
84 public:
85  /// Compression/decompression methods.
86  /// @note
87  /// Don't mix up "eNone" with CCompress::eLevel_NoCompression
88  /// compression level. In "eNone" mode data will be copied "as is",
89  /// without parsing or writing any header or footer.
90  /// CCompress::eLevel_NoCompression use no-compression for a choosen
91  /// compression format and can have extra data necessary to be valid,
92  /// @note
93  /// You can use "eNone" to allow transparent reading/writing data
94  /// from/to an underlying stream using compression streams, but we
95  /// do not recommend this. It is always better to use direct access
96  /// to the original input/output stream if you know in advance that
97  /// data is uncompressed.
98  enum EMethod {
99  eNone, ///< no compression method (copy "as is")
100  eBZip2, ///< BZIP2
101  eLZO, ///< LZO (LZO1X)
102  eZip, ///< ZLIB (raw zip data / DEFLATE method)
103  eGZipFile, ///< .gz file (including concatenated files)
104  eConcatenatedGZipFile, ///< Synonym for eGZipFile (for backward compatibility) - deprecated
105  eZipCloudflare, ///< ZLIB (raw zip data / DEFLATE method) Cloudflare fork
106  eGZipCloudflareFile, ///< .gz file (including concatenated files) Cloudflare fork
107  eZstd ///< ZStandard (raw zstd data)
108  };
109 
110  /// Check if specified compression method is supported on a current platform.
111  ///
112  /// Compression streams can be created for any method. It ignores the fact
113  /// that some compression library can be missed on a current platform,
114  /// that lead to a throwing an exception on usage of the newly created stream.
115  /// It is recommended to guard library-specific code by HAVE_LIB* macros
116  /// (see comments at the beginning of "compress.hpp"), at least for eLZO and eZstd.
117  /// But if this is inconvenient for some reason you can use this method
118  /// to do a check at runtime.
119  ///
120  /// @param method
121  /// Method to check.
122  /// @return
123  /// Return TRUE if selected compression method is supported, FALSE otherwise.
124  ///
125  static bool HaveSupport(EMethod method);
126 
127  /// Default algorithm-specific compression/decompression flags.
128  /// @sa TFlags, EMethod
130  fDefault = (1<<15) ///< Use algorithm-specific defaults
131  };
132 };
133 
134 
135 /////////////////////////////////////////////////////////////////////////////
136 ///
137 /// CCompressIStream --
138 ///
139 /// Input compression stream.
140 
142  public CCompressionIStream
143 {
144 public:
145  /// Create an input stream that compresses data read from an underlying
146  /// input stream.
147  ///
148  /// Reading from CCompressIStream results in data being read from an
149  /// underlying "stream", compressed using the specified "method" and
150  /// algorithm-specific "flags", and returned to the calling code in
151  /// compressed form.
152  /// @param stream
153  /// The underlying input stream.
154  /// NOTE: This stream should be opened in binary mode!
155  /// @param method
156  /// The method to use for data compression.
157  /// @param flags
158  /// By default, predefined algorithm-specific flags will be used,
159  /// but they can be overridden by using this parameter.
160  /// @param level
161  /// Compression level.
162  /// @param own_istream
163  /// If set to eTakeOwnership then the 'stream' will be owned by
164  /// CCompressIStream and automatically deleted when necessary.
165  ///
166  CCompressIStream(CNcbiIstream& stream, EMethod method,
167  ICompression::TFlags flags = fDefault,
169  ENcbiOwnership own_istream = eNoOwnership);
170 };
171 
172 
173 /////////////////////////////////////////////////////////////////////////////
174 ///
175 /// CCompressOStream --
176 ///
177 /// Output compression stream.
178 /// The output stream will receive all data only after finalization.
179 /// So, do not forget to call Finalize() after the last data is written to
180 /// this stream. Otherwise, finalization will occur only in the stream's
181 /// destructor.
182 
184  public CCompressionOStream
185 {
186 public:
187  /// Create an output stream that compresses data written to it.
188  ///
189  /// Writing to CCompressOStream results in the data written by the
190  /// calling code being compressed using the specified "method" and
191  /// algorithm-specific "flags", and written to an underlying "stream"
192  /// in compressed form.
193  /// @param stream
194  /// The underlying output stream.
195  /// NOTE: This stream should be opened in binary mode!
196  /// @param method
197  /// The method to use for data compression.
198  /// @param flags
199  /// By default, predefined algorithm-specific flags will be used,
200  /// but they can be overridden by using this parameter.
201  /// @param level
202  /// Compression level.
203  /// @param own_ostream
204  /// If set to eTakeOwnership then the 'stream' will be owned by
205  /// CCompressOStream and automatically deleted when necessary.
206  ///
207  CCompressOStream(CNcbiOstream& stream, EMethod method,
208  ICompression::TFlags flags = fDefault,
210  ENcbiOwnership own_ostream = eNoOwnership);
211 };
212 
213 
214 /////////////////////////////////////////////////////////////////////////////
215 ///
216 /// CDecompressIStream --
217 ///
218 /// Input decompression stream.
219 
221  public CCompressionIStream
222 {
223 public:
224  /// Create an input stream that decompresses data read from an underlying
225  /// input stream.
226  ///
227  /// Reading from CDecompressIStream results in data being read from an
228  /// underlying "stream", decompressed using the specified "method" and
229  /// algorithm-specific "flags", and returned to the calling code in
230  /// decompressed form.
231  /// @param stream
232  /// The underlying input stream, having compressed data.
233  /// NOTE: This stream should be opened in binary mode!
234  /// @param method
235  /// The method to use for data decompression.
236  /// @param flags
237  /// By default, predefined algorithm-specific flags will be used,
238  /// but they can be overridden by using this parameter.
239  /// @param own_istream
240  /// If set to eTakeOwnership then the 'stream' will be owned by
241  /// CDecompressIStream and automatically deleted when necessary.
242  ///
243  CDecompressIStream(CNcbiIstream& stream, EMethod method,
244  ICompression::TFlags flags = fDefault,
245  ENcbiOwnership own_istream = eNoOwnership);
246 };
247 
248 
249 /////////////////////////////////////////////////////////////////////////////
250 ///
251 /// CDecompressOStream --
252 ///
253 /// Output decompression stream.
254 /// The output stream will receive all data only after finalization.
255 /// So, do not forget to call Finalize() after the last data is written to
256 /// this stream. Otherwise, finalization will occur only in the stream's
257 /// destructor.
258 
260  public CCompressionOStream
261 {
262 public:
263  /// Create an output stream that decompresses data written to it.
264  ///
265  /// Writing to CDecompressOStream results in the data written by the
266  /// calling code being decompressed using the specified "method" and
267  /// algorithm-specific "flags", and written to an underlying "stream"
268  /// in decompressed form.
269  /// @param stream
270  /// The underlying output stream.
271  /// NOTE: This stream should be opened in binary mode!
272  /// @param method
273  /// The method to use for data compression.
274  /// @param flags
275  /// By default, predefined algorithm-specific flags will be used,
276  /// but they can be overridden by using this parameter.
277  /// @param own_istream
278  /// If set to eTakeOwnership then the 'stream' will be owned by
279  /// CDecompressOStream and automatically deleted when necessary.
280  ///
281  CDecompressOStream(CNcbiOstream& stream, EMethod method,
282  ICompression::TFlags flags = fDefault,
283  ENcbiOwnership own_ostream = eNoOwnership);
284 };
285 
286 
287 
288 /// Auxiliary function to get manipulator error
289 template <class T>
290 string g_GetManipulatorError(T& stream)
291 {
292  int status;
293  string description;
294  if (stream.GetError(status, description)) {
295  return description + " (errcode = " + NStr::IntToString(status) + ")";
296  }
297  return kEmptyStr;
298 }
299 
300 
301 /////////////////////////////////////////////////////////////////////////////
302 ///
303 /// CManipulatorIProxy -- base class for manipulators using in operator>>.
304 ///
305 /// CManipulator[IO]Proxy classes does the actual work to compress/decompress
306 /// data used with manipulators.
307 /// Throw exception of type CCompressionException on errors.
308 ///
309 /// @note
310 /// Compression/decompression manipulators looks like a manipulators, but
311 /// are not a real iostream manipulators and have a different semantics.
312 /// With real stream manipulators you can write something like:
313 /// os << manipulator << value;
314 /// that will have the same effect as:
315 /// os << manipulator; os << value;
316 /// But with compression/decompression manipulators you can use only first
317 /// form. Actually "manipulators" compress/decompress only single item
318 /// specified next to it rather than all items until the end of
319 /// the statement. The << manipulators accept any input stream or string as
320 /// parameter, compress/decompress all data and put result into output
321 /// stream 'os'. The >> manipulators do the same, but input stream is
322 /// specified on the left side of statement and output stream (or string)
323 /// on the right. But be aware of using >> manipulators with strings.
324 /// Compression/decompression can provide binary data that cannot be put
325 /// into strings.
326 /// @note
327 /// Be aware to use decompression manipulators with input streams as
328 /// parameters. Manipulators will try to decompress data until EOF or
329 /// any error occurs. If the input stream contains something behind
330 /// compressed data, that some portion of this data can be read into
331 /// internal buffers and cannot be returned back into the input stream.
332 /// @note
333 /// The diagnostics is very limited for manipulators. On error it can
334 /// throw exceptions of type CCompressionException only.
335 /// @sa CManipulatorOProxy, TCompressIProxy, TDecompressIProxy
336 
337 template <class TInputStream, class TOutputStream>
339 {
340 public:
341  /// Constructor.
343  : m_Stream(stream), m_Method(method)
344  {}
345 
346  /// The >> operator for stream.
348  {
349  // Copy streams, compressing data on the fly
350  TInputStream is(m_Stream, m_Method);
351  if (!NcbiStreamCopy(stream, is)) {
352  NCBI_THROW(CCompressionException, eCompression,
353  "CManipulatorProxy:: NcbiStreamCopy() failed");
354  }
355  CCompressionProcessor::EStatus status = is.GetStatus();
356  if ( status == CCompressionProcessor::eStatus_Error ) {
357  NCBI_THROW(CCompressionException, eCompression,
358  "CManipulatorProxy:: " + g_GetManipulatorError(is));
359  }
360  return m_Stream;
361  }
362 
363  /// The >> operator for string.
364  CNcbiIstream& operator>>(string& value) const
365  {
366  // Build compression stream
367  TInputStream is(m_Stream, m_Method);
368  // Read value from the input stream
369  is >> value;
370  CCompressionProcessor::EStatus status = is.GetStatus();
371  if ( status == CCompressionProcessor::eStatus_Error ) {
372  NCBI_THROW(CCompressionException, eCompression,
373  "CManipulatorProxy:: " + g_GetManipulatorError(is));
374  }
375  return m_Stream;
376  }
377 private:
378  /// Disable using input stream as parameter for manipulator
379  void operator>>(CNcbiIstream& stream) const;
380 
381 private:
382  CNcbiIstream& m_Stream; ///< Main stream
383  CCompressStream::EMethod m_Method; ///< Compression/decompression method
384 };
385 
386 
387 /////////////////////////////////////////////////////////////////////////////
388 ///
389 /// CManipulatorOProxy -- base class for manipulators using in operator<<.
390 ///
391 /// See description and notes for CManipulatorOProxy.
392 /// @sa CManipulatorIProxy, TCompressIProxy, TDecompressIProxy
393 
394 template <class TInputStream, class TOutputStream>
396 {
397 public:
398  /// Constructor.
400  : m_Stream(stream), m_Method(method)
401  {}
402 
403  /// The << operator for input streams.
405  {
406  // Copy streams, compressing data on the fly
407  TInputStream is(stream, m_Method);
408  if (!NcbiStreamCopy(m_Stream, is)) {
409  NCBI_THROW(CCompressionException, eCompression,
410  "CManipulatorProxy:: NcbiStreamCopy() failed");
411  }
412  CCompressionProcessor::EStatus status = is.GetStatus();
413  if ( status == CCompressionProcessor::eStatus_Error ) {
414  NCBI_THROW(CCompressionException, eCompression,
415  "CManipulatorProxy:: " + g_GetManipulatorError(is));
416  }
417  return m_Stream;
418  }
419 
420  /// The << operator for string.
421  CNcbiOstream& operator<<(const string& str) const
422  {
423  // Build compression stream
424  TOutputStream os(m_Stream, m_Method);
425  // Put string into the output stream
426  os << str;
427  CCompressionProcessor::EStatus status = os.GetStatus();
428  if ( status == CCompressionProcessor::eStatus_Error ) {
429  NCBI_THROW(CCompressionException, eCompression,
430  "CManipulatorProxy:: " + g_GetManipulatorError(os));
431  }
432  // Finalize the output stream
433  os.Finalize();
434  status = os.GetStatus();
436  NCBI_THROW(CCompressionException, eCompression,
437  "CManipulatorProxy:: " + g_GetManipulatorError(os));
438  }
439  return m_Stream;
440  }
441 
442  /// The << operator for char*
443  CNcbiOstream& operator<<(const char* str) const
444  {
445  // Build compression stream
446  TOutputStream os(m_Stream, m_Method);
447  // Put string into the output stream
448  os << str;
449  CCompressionProcessor::EStatus status = os.GetStatus();
450  if ( status == CCompressionProcessor::eStatus_Error ) {
451  NCBI_THROW(CCompressionException, eCompression,
452  "CManipulatorProxy:: " + g_GetManipulatorError(os));
453  }
454  // Finalize the output stream
455  os.Finalize();
456  status = os.GetStatus();
458  NCBI_THROW(CCompressionException, eCompression,
459  "CManipulatorProxy:: " + g_GetManipulatorError(os));
460  }
461  return m_Stream;
462  }
463 private:
464  /// Disable using output stream as parameter for manipulator
465  void operator<<(CNcbiOstream& stream) const;
466 
467 private:
468  CNcbiOstream& m_Stream; ///< Main output stream
469  CCompressStream::EMethod m_Method; ///< Compression/decompression method
470 };
471 
472 
473 /// Type of compression manipulators for operator>>
475 /// Type of decompression manipulators for operator>>
477 /// Type of compression manipulators for operator<<
479 /// Type of decompression manipulators for operator<<
481 
482 
483 /// Classes that we actually put on the stream when using manipulators.
484 /// We need to have different types for each possible method and
485 /// compression/decompression action to call "right" version of operators >> and <<
486 /// (see operator>> and operator<< for each class).
502 
503 
504 /// Manipulator definitions.
505 /// This allow use manipulators without ().
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()
521 
522 
523 // When you pass an object of type M[Dec|C]ompress_Proxy_* to an
524 // istream/ostream, it returns an object of CManipulator[IO]Proxy with needed
525 // compression/decompression method that has the overloaded operators
526 // >> and <<. This will process the next object and then return
527 // the stream to continue processing as normal.
528 
529 // --- compression ---
530 
531 inline
533 {
535 }
536 
537 inline
539 {
541 }
542 
543 inline
544 TCompressOProxy operator<<(ostream& os, MCompress_Proxy_LZO const& /*obj*/)
545 {
547 }
548 
549 inline
550 TCompressIProxy operator>>(istream& is, MCompress_Proxy_LZO const& /*obj*/)
551 {
553 }
554 
555 inline
556 TCompressOProxy operator<<(ostream& os, MCompress_Proxy_Zip const& /*obj*/)
557 {
559 }
560 
561 inline
562 TCompressIProxy operator>>(istream& is, MCompress_Proxy_Zip const& /*obj*/)
563 {
565 }
566 
567 inline
569 {
571 }
572 
573 inline
575 {
577 }
578 
579 inline
581 {
583 }
584 
585 inline
587 {
589 }
590 
591 inline
593 {
595 }
596 
597 inline
599 {
601 }
602 
603 inline
604 TCompressOProxy operator<<(ostream& os, MCompress_Proxy_Zstd const& /*obj*/)
605 {
607 }
608 
609 inline
610 TCompressIProxy operator>>(istream& is, MCompress_Proxy_Zstd const& /*obj*/)
611 {
613 }
614 
615 // --- decompression ---
616 
617 inline
619 {
621 }
622 
623 inline
625 {
627 }
628 
629 inline
631 {
633 }
634 
635 inline
637 {
639 }
640 
641 inline
643 {
645 }
646 
647 inline
649 {
651 }
652 
653 inline
655 {
657 }
658 
659 inline
661 {
663 }
664 
665 inline
667 {
669 }
670 
671 inline
673 {
675 }
676 
677 inline
679 {
681 }
682 
683 inline
685 {
687 }
688 
689 inline
691 {
693 }
694 
695 inline
697 {
699 }
700 
701 inline
703 {
705 }
706 
707 inline
709 {
711 }
712 
713 
714 /* @} */
715 
716 
718 
719 
720 #endif /* UTIL_COMPRESS__STREAM_UTIL__HPP */
CCompressIStream –.
CCompressOStream –.
CCompressStream –.
Definition: stream_util.hpp:83
CDecompressIStream –.
CDecompressOStream –.
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 uch flags
#define T(s)
Definition: common.h:230
static const char * str(char *buf, int n)
Definition: stats.c:84
@ eNoOwnership
No ownership is assumed.
Definition: ncbi_types.h:135
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.
Definition: stream_util.hpp:98
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.
@ eLZO
LZO (LZO1X)
@ eNone
no compression method (copy "as is")
Definition: stream_util.hpp:99
@ eZstd
ZStandard (raw zstd data)
@ eConcatenatedGZipFile
Synonym for eGZipFile (for backward compatibility) - deprecated.
@ eGZipFile
.gz file (including concatenated files)
ELevel
Compression level.
Definition: compress.hpp:142
unsigned int TFlags
Compression flags.
Definition: compress.hpp:160
EStatus
Type of the result of all basic functions.
Definition: compress.hpp:467
@ eStatus_Error
Error has occurred. The error code can be acquired by GetErrorCode().
Definition: compress.hpp:475
@ eStatus_EndOfData
Special case of eStatus_Success.
Definition: compress.hpp:473
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
Definition: ncbistre.hpp:146
bool NcbiStreamCopy(CNcbiOstream &os, CNcbiIstream &is)
Copy the entire contents of stream "is" to stream "os".
Definition: ncbistre.cpp:211
#define kEmptyStr
Definition: ncbistr.hpp:123
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
Definition: ncbistr.hpp:5084
ENcbiOwnership
Ownership relations between objects.
Definition: ncbi_types.h:134
LZO Compression API.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
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...
Definition: static_set.hpp:72
ZLib Compression API.
ZLib Compression API - Cloudflare ZLIB wrapper (https://github.com/cloudflare/zlib)
Zstandard (zstd) Compression API.
Modified on Wed May 01 14:21:49 2024 by modify_doxy.py rev. 669887