6 #ifndef HEPMC3_COMPRESSEDIO_H
7 #define HEPMC3_COMPRESSEDIO_H
8 #if HEPMC3_USE_COMPRESSION
10 #define BXZSTR_Z_SUPPORT 1
12 #if HEPMC3_LZMA_SUPPORT
13 #define BXZSTR_LZMA_SUPPORT 1
15 #if HEPMC3_BZ2_SUPPORT
16 #define BXZSTR_BZ2_SUPPORT 1
18 #include "HepMC3/bxzstr/bxzstr.hpp"
21 using ofstream = bxz::ofstream;
22 using ostream = bxz::ostream;
23 using ifstream = bxz::ifstream;
24 using istream = bxz::istream;
26 using Compression = bxz::Compression;
27 inline Compression detect_compression_type(
char* in_buff_start,
char* in_buff_end) {
28 return bxz::detect_type(in_buff_start,in_buff_end);
30 const std::vector<Compression> supported_compression_types = {
34 #if HEPMC3_LZMA_SUPPORT
37 #if HEPMC3_BZ2_SUPPORT
41 std::vector<Compression> known_compression_types = {
49 string to_string(HepMC3::Compression & c) {
51 case HepMC3::Compression::z:
53 case HepMC3::Compression::lzma:
54 return string(
"lzma");
55 case HepMC3::Compression::bz2:
60 return string(
"plaintext");