aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/compression/zlib/zlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/compression/zlib/zlib.h')
-rw-r--r--src/lib/compression/zlib/zlib.h44
1 files changed, 34 insertions, 10 deletions
diff --git a/src/lib/compression/zlib/zlib.h b/src/lib/compression/zlib/zlib.h
index 5805efb57..963fbc269 100644
--- a/src/lib/compression/zlib/zlib.h
+++ b/src/lib/compression/zlib/zlib.h
@@ -1,7 +1,7 @@
/*
* Zlib Compressor
* (C) 2001 Peter J Jones
-* 2001-2007 Jack Lloyd
+* 2001-2007,2014 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
@@ -23,10 +23,9 @@ class BOTAN_DLL Zlib_Compression : public Stream_Compression
* @param level how much effort to use on compressing (0 to 9);
* higher levels are slower but tend to give better
* compression
- * @param raw_deflate if true no zlib header/trailer will be used
*/
- Zlib_Compression(size_t level = 6, bool raw_deflate = false) :
- m_level(level), m_raw_deflate(raw_deflate) {}
+
+ Zlib_Compression(size_t level = 6) : m_level(level) {}
std::string name() const override { return "Zlib_Compression"; }
@@ -34,26 +33,51 @@ class BOTAN_DLL Zlib_Compression : public Stream_Compression
Compression_Stream* make_stream() const;
const size_t m_level;
- const bool m_raw_deflate;
};
/**
-* Zlib Deccompression
+* Zlib Decompression
*/
class BOTAN_DLL Zlib_Decompression : public Stream_Decompression
{
public:
+ std::string name() const override { return "Zlib_Decompression"; }
+
+ private:
+ Compression_Stream* make_stream() const;
+ };
+
+/**
+* Deflate Compression
+*/
+class BOTAN_DLL Deflate_Compression : public Stream_Compression
+ {
+ public:
/**
- * @param raw_deflate if true no zlib header/trailer will be used
+ * @param level how much effort to use on compressing (0 to 9);
+ * higher levels are slower but tend to give better
+ * compression
*/
- Zlib_Decompression(bool raw_deflate = false) : m_raw_deflate(raw_deflate) {}
+ Deflate_Compression(size_t level = 6) : m_level(level) {}
- std::string name() const override { return "Zlib_Decompression"; }
+ std::string name() const override { return "Deflate_Compression"; }
private:
Compression_Stream* make_stream() const;
- const bool m_raw_deflate;
+ const size_t m_level;
+ };
+
+/**
+* Deflate Decompression
+*/
+class BOTAN_DLL Deflate_Decompression : public Stream_Decompression
+ {
+ public:
+ std::string name() const override { return "Deflate_Decompression"; }
+
+ private:
+ Compression_Stream* make_stream() const;
};
/**