11#ifndef HEPMC3_COMPRESSEDIO_H
12#define HEPMC3_COMPRESSEDIO_H
13#if HEPMC3_USE_COMPRESSION
15#define BXZSTR_Z_SUPPORT 1
17#if HEPMC3_LZMA_SUPPORT
18#define BXZSTR_LZMA_SUPPORT 1
21#define BXZSTR_BZ2_SUPPORT 1
23#if HEPMC3_ZSTD_SUPPORT
24#define BXZSTR_ZSTD_SUPPORT 1
27#include "HepMC3/bxzstr/bxzstr.hpp"
33using ofstream = bxz::ofstream;
34using ostream = bxz::ostream;
35using ifstream = bxz::ifstream;
36using istream = bxz::istream;
41 return bxz::detect_type(in_buff_start,in_buff_end);
48#if HEPMC3_LZMA_SUPPORT
54#if HEPMC3_ZSTD_SUPPORT
63#if HEPMC3_LZMA_SUPPORT
69#if HEPMC3_ZSTD_SUPPORT
84 case HepMC3::Compression::z:
85 return std::string(
"z");
86 case HepMC3::Compression::lzma:
87 return std::string(
"lzma");
88 case HepMC3::Compression::bz2:
89 return std::string(
"bz2");
90 case HepMC3::Compression::zstd:
91 return std::string(
"zstd");
95 return std::string(
"plaintext");
std::string to_string(HepMC3::Compression &c)
Convert from the compression type to string.
bxz::Compression Compression
Compression types from bxzstr.
constexpr std::array< Compression, 4 > known_compression_types
Array of known compression types.
constexpr int num_supported_compression_types
Number of supported compression types.
constexpr std::array< Compression, num_supported_compression_types > supported_compression_types
Array of supported compression types.
Compression detect_compression_type(const char *in_buff_start, const char *in_buff_end)
Function to detect compression type.