aboutsummaryrefslogtreecommitdiff
path: root/lib/UnrarXLib/coder.cpp
diff options
context:
space:
mode:
authorStefan Saraev <stefan@saraev.ca>2017-03-27 22:12:40 +0300
committerStefan Saraev <stefan@saraev.ca>2017-04-07 20:14:12 +0300
commitbee51e139fff45c788b9eb1e161b297d5ee7895b (patch)
tree69ad126aa511f7cf8ef70047c4ec28cad1f21888 /lib/UnrarXLib/coder.cpp
parent1d718acfb13b0681805867dc6ce4f9715c0d0216 (diff)
[cleanup] remove UnrarXLib
Diffstat (limited to 'lib/UnrarXLib/coder.cpp')
-rw-r--r--lib/UnrarXLib/coder.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/lib/UnrarXLib/coder.cpp b/lib/UnrarXLib/coder.cpp
deleted file mode 100644
index d556f0e18c..0000000000
--- a/lib/UnrarXLib/coder.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-inline unsigned int RangeCoder::GetChar()
-{
- return(UnpackRead->GetChar());
-}
-
-
-void RangeCoder::InitDecoder(Unpack *UnpackRead)
-{
- RangeCoder::UnpackRead=UnpackRead;
-
- low=code=0;
- range=uint(-1);
- for (int i=0;i < 4;i++)
- code=(code << 8) | GetChar();
-}
-
-
-#define ARI_DEC_NORMALIZE(code,low,range,read) \
-{ \
- while ((low^(low+range))<TOP || (range<BOT && ((range=-low&(BOT-1)),1))) \
- { \
- code=(code << 8) | read->GetChar(); \
- range <<= 8; \
- low <<= 8; \
- } \
-}
-
-
-inline int RangeCoder::GetCurrentCount()
-{
- return (code-low)/(range /= SubRange.scale);
-}
-
-
-inline uint RangeCoder::GetCurrentShiftCount(uint SHIFT)
-{
- return (code-low)/(range >>= SHIFT);
-}
-
-
-inline void RangeCoder::Decode()
-{
- low += range*SubRange.LowCount;
- range *= SubRange.HighCount-SubRange.LowCount;
-}