Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2009-12-14 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:01 +0300
commit1fbaf0aac5000ca563a1ee2bb15ba6821a08e468 (patch)
treeec079944edffd096355ecb0c499f889364aefb4b /CPP/7zip/Compress/BitmDecoder.h
parent2fed8721946901375d21d4a506fe8b114045b397 (diff)
9.09 beta
Diffstat (limited to 'CPP/7zip/Compress/BitmDecoder.h')
-rwxr-xr-xCPP/7zip/Compress/BitmDecoder.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/CPP/7zip/Compress/BitmDecoder.h b/CPP/7zip/Compress/BitmDecoder.h
index 2885ed78..4369b452 100755
--- a/CPP/7zip/Compress/BitmDecoder.h
+++ b/CPP/7zip/Compress/BitmDecoder.h
@@ -7,16 +7,16 @@
namespace NBitm {
-const int kNumBigValueBits = 8 * 4;
-const int kNumValueBytes = 3;
-const int kNumValueBits = 8 * kNumValueBytes;
+const unsigned kNumBigValueBits = 8 * 4;
+const unsigned kNumValueBytes = 3;
+const unsigned kNumValueBits = 8 * kNumValueBytes;
const UInt32 kMask = (1 << kNumValueBits) - 1;
template<class TInByte>
class CDecoder
{
- UInt32 m_BitPos;
+ unsigned m_BitPos;
UInt32 m_Value;
public:
TInByte m_Stream;
@@ -39,19 +39,19 @@ public:
m_Value = (m_Value << 8) | m_Stream.ReadByte();
}
- UInt32 GetValue(UInt32 numBits) const
+ UInt32 GetValue(unsigned numBits) const
{
// return (m_Value << m_BitPos) >> (kNumBigValueBits - numBits);
return ((m_Value >> (8 - m_BitPos)) & kMask) >> (kNumValueBits - numBits);
}
- void MovePos(UInt32 numBits)
+ void MovePos(unsigned numBits)
{
m_BitPos += numBits;
Normalize();
}
- UInt32 ReadBits(UInt32 numBits)
+ UInt32 ReadBits(unsigned numBits)
{
UInt32 res = GetValue(numBits);
MovePos(numBits);