summaryrefslogtreecommitdiff
path: root/zinflate.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-11-18 15:32:28 -0500
committerJeffrey Walton <noloader@gmail.com>2015-11-18 15:32:28 -0500
commit6ac1e46a1fb01f01705b67dd553d5ba317b1dc3e (patch)
treef0d873d0b377a91dce5ee384e60426ef57efc92b /zinflate.h
parentd2fda9bd4231a7dfcb44e59150f11246d992843f (diff)
downloadcryptopp-git-6ac1e46a1fb01f01705b67dd553d5ba317b1dc3e.tar.gz
Cleared issues 11,12,13 (Clang integrated assembler), 58 (RC rollup), 66 (Coverity rollup)
Diffstat (limited to 'zinflate.h')
-rw-r--r--zinflate.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/zinflate.h b/zinflate.h
index a14f83c9..8c08ed08 100644
--- a/zinflate.h
+++ b/zinflate.h
@@ -2,9 +2,9 @@
#define CRYPTOPP_ZINFLATE_H
#include "cryptlib.h"
-#include "filters.h"
#include "secblock.h"
-#include <vector>
+#include "filters.h"
+#include "stdcpp.h"
NAMESPACE_BEGIN(CryptoPP)
@@ -14,7 +14,6 @@ class LowFirstBitReader
public:
LowFirstBitReader(BufferedTransformation &store)
: m_store(store), m_buffer(0), m_bitsBuffered(0) {}
-// unsigned long BitsLeft() const {return m_store.MaxRetrievable() * 8 + m_bitsBuffered;}
unsigned int BitsBuffered() const {return m_bitsBuffered;}
unsigned long PeekBuffer() const {return m_buffer;}
bool FillBuffer(unsigned int length);
@@ -40,8 +39,10 @@ public:
class Err : public Exception {public: Err(const std::string &what) : Exception(INVALID_DATA_FORMAT, "HuffmanDecoder: " + what) {}};
- HuffmanDecoder() {}
- HuffmanDecoder(const unsigned int *codeBitLengths, unsigned int nCodes) {Initialize(codeBitLengths, nCodes);}
+ HuffmanDecoder() : m_maxCodeBits(0), m_cacheBits(0), m_cacheMask(0), m_normalizedCacheMask(0) {}
+ HuffmanDecoder(const unsigned int *codeBitLengths, unsigned int nCodes)
+ : m_maxCodeBits(0), m_cacheBits(0), m_cacheMask(0), m_normalizedCacheMask(0)
+ {Initialize(codeBitLengths, nCodes);}
void Initialize(const unsigned int *codeBitLengths, unsigned int nCodes);
unsigned int Decode(code_t code, /* out */ value_t &value) const;
@@ -96,9 +97,10 @@ public:
class UnexpectedEndErr : public Err {public: UnexpectedEndErr() : Err(INVALID_DATA_FORMAT, "Inflator: unexpected end of compressed block") {}};
class BadBlockErr : public Err {public: BadBlockErr() : Err(INVALID_DATA_FORMAT, "Inflator: error in compressed block") {}};
- /*! \param repeat decompress multiple compressed streams in series
- \param autoSignalPropagation 0 to turn off MessageEnd signal
- */
+ //! \brief RFC 1951 Decompressor
+ //! \param attachment the filter's attached transformation
+ //! \param repeat decompress multiple compressed streams in series
+ //! \param autoSignalPropagation 0 to turn off MessageEnd signal
Inflator(BufferedTransformation *attachment = NULL, bool repeat = false, int autoSignalPropagation = -1);
void IsolatedInitialize(const NameValuePairs &parameters);