summaryrefslogtreecommitdiff
path: root/zinflate.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-05-16 00:02:31 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-05-16 00:02:31 +0000
commit36fa3fc2b13356f20ed58c37cdeb68c830c59829 (patch)
treebf937217f2ef50484de29e14afe933833ee627b6 /zinflate.h
parentb2f2c1f2c534d20cd06aed7717b19b8ab101e254 (diff)
downloadcryptopp-36fa3fc2b13356f20ed58c37cdeb68c830c59829.tar.gz
misc optimizations
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@68 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'zinflate.h')
-rw-r--r--zinflate.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/zinflate.h b/zinflate.h
index b3172c8..34c39a8 100644
--- a/zinflate.h
+++ b/zinflate.h
@@ -124,15 +124,21 @@ private:
void OutputString(const byte *string, unsigned int length);
void OutputPast(unsigned int length, unsigned int distance);
+ static const HuffmanDecoder *FixedLiteralDecoder();
+ static const HuffmanDecoder *FixedDistanceDecoder();
+
+ const HuffmanDecoder *GetLiteralDecoder() const;
+ const HuffmanDecoder *GetDistanceDecoder() const;
+
enum State {PRE_STREAM, WAIT_HEADER, DECODING_BODY, POST_STREAM, AFTER_END};
State m_state;
- bool m_repeat, m_eof, m_decodersInitializedWithFixedCodes;
+ bool m_repeat, m_eof;
byte m_blockType;
word16 m_storedLen;
enum NextDecode {LITERAL, LENGTH_BITS, DISTANCE, DISTANCE_BITS};
NextDecode m_nextDecode;
unsigned int m_literal, m_distance; // for LENGTH_BITS or DISTANCE_BITS
- HuffmanDecoder m_literalDecoder, m_distanceDecoder;
+ HuffmanDecoder m_dynamicLiteralDecoder, m_dynamicDistanceDecoder;
LowFirstBitReader m_reader;
SecByteBlock m_window;
unsigned int m_maxDistance, m_current, m_lastFlush;