8#include <botan/compression.h>
9#include <botan/mem_ops.h>
10#include <botan/exceptn.h>
13#if defined(BOTAN_HAS_ZLIB)
14 #include <botan/zlib.h>
17#if defined(BOTAN_HAS_BZIP2)
18 #include <botan/bzip2.h>
21#if defined(BOTAN_HAS_LZMA)
22 #include <botan/lzma.h>
28std::unique_ptr<Compression_Algorithm>
31#if defined(BOTAN_HAS_ZLIB)
33 return std::make_unique<Zlib_Compression>();
35 return std::make_unique<Gzip_Compression>();
36 if(
name ==
"Deflate" ||
name ==
"deflate")
37 return std::make_unique<Deflate_Compression>();
40#if defined(BOTAN_HAS_BZIP2)
42 return std::make_unique<Bzip2_Compression>();
45#if defined(BOTAN_HAS_LZMA)
47 return std::make_unique<LZMA_Compression>();
55std::unique_ptr<Compression_Algorithm>
66std::unique_ptr<Decompression_Algorithm>
69#if defined(BOTAN_HAS_ZLIB)
71 return std::make_unique<Zlib_Decompression>();
73 return std::make_unique<Gzip_Decompression>();
74 if(
name ==
"Deflate" ||
name ==
"deflate")
75 return std::make_unique<Deflate_Decompression>();
78#if defined(BOTAN_HAS_BZIP2)
80 return std::make_unique<Bzip2_Decompression>();
83#if defined(BOTAN_HAS_LZMA)
85 return std::make_unique<LZMA_Decompression>();
93std::unique_ptr<Decompression_Algorithm>
#define BOTAN_UNUSED(...)
static std::unique_ptr< Compression_Algorithm > create_or_throw(std::string_view algo_spec)
static std::unique_ptr< Compression_Algorithm > create(std::string_view algo_spec)
virtual std::string name() const =0
static std::unique_ptr< Decompression_Algorithm > create(std::string_view algo_spec)
virtual std::string name() const =0
static std::unique_ptr< Decompression_Algorithm > create_or_throw(std::string_view algo_spec)