Botan
1.11.15
|
00001 /* 00002 * Lzma Compressor 00003 * (C) 2001 Peter J Jones 00004 * 2001-2007 Jack Lloyd 00005 * 2012 Vojtech Kral 00006 * 00007 * Botan is released under the Simplified BSD License (see license.txt) 00008 */ 00009 00010 #ifndef BOTAN_LZMA_H__ 00011 #define BOTAN_LZMA_H__ 00012 00013 #include <botan/compression.h> 00014 00015 namespace Botan { 00016 00017 /** 00018 * LZMA Compression 00019 */ 00020 class BOTAN_DLL LZMA_Compression : public Stream_Compression 00021 { 00022 public: 00023 /** 00024 * @param level how much effort to use on compressing (0 to 9); 00025 * higher levels are slower but tend to give better 00026 * compression 00027 */ 00028 LZMA_Compression(size_t level = 6) : m_level(level) {} 00029 00030 std::string name() const override { return "LZMA_Compression"; } 00031 00032 private: 00033 Compression_Stream* make_stream() const; 00034 00035 const size_t m_level; 00036 }; 00037 00038 /** 00039 * LZMA Deccompression 00040 */ 00041 class BOTAN_DLL LZMA_Decompression : public Stream_Decompression 00042 { 00043 public: 00044 std::string name() const override { return "LZMA_Decompression"; } 00045 private: 00046 Compression_Stream* make_stream() const; 00047 }; 00048 00049 } 00050 00051 #endif