summaryrefslogtreecommitdiff
path: root/payloads/libpayload/liblzma
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/liblzma')
-rw-r--r--payloads/libpayload/liblzma/lzmadecode.c8
-rw-r--r--payloads/libpayload/liblzma/lzmadecode.h3
2 files changed, 0 insertions, 11 deletions
diff --git a/payloads/libpayload/liblzma/lzmadecode.c b/payloads/libpayload/liblzma/lzmadecode.c
index 1cf647d27b..c8115d308a 100644
--- a/payloads/libpayload/liblzma/lzmadecode.c
+++ b/payloads/libpayload/liblzma/lzmadecode.c
@@ -33,12 +33,10 @@
#define RC_INIT2 Code = 0; Range = 0xFFFFFFFF; \
{ int i; for(i = 0; i < 5; i++) { RC_TEST; Code = (Code << 8) | RC_READ_BYTE; }}
-
#define RC_TEST { if (Buffer == BufferLim) return LZMA_RESULT_DATA_ERROR; }
#define RC_INIT(buffer, bufferSize) Buffer = buffer; BufferLim = buffer + bufferSize; RC_INIT2
-
#define RC_NORMALIZE if (Range < kTopValue) { RC_TEST; Range <<= 8; Code = (Code << 8) | RC_READ_BYTE; }
#define IfBit0(p) RC_NORMALIZE; bound = (Range >> kNumBitModelTotalBits) * *(p); if (Code < bound)
@@ -56,7 +54,6 @@
do { CProb *cp = probs + res; RC_GET_BIT(cp, res) } while(--i != 0); \
res -= (1 << numLevels); }
-
#define kNumPosBitsMax 4
#define kNumPosStatesMax (1 << kNumPosBitsMax)
@@ -74,7 +71,6 @@
#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
-
#define kNumStates 12
#define kNumLitStates 7
@@ -143,7 +139,6 @@ int LzmaDecode(CLzmaDecoderState *vs,
UInt32 literalPosMask = (1 << (vs->Properties.lp)) - 1;
int lc = vs->Properties.lc;
-
int state = 0;
UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
int len = 0;
@@ -164,7 +159,6 @@ int LzmaDecode(CLzmaDecoderState *vs,
RC_INIT(inStream, inSize);
-
while(nowPos < outSize)
{
CProb *prob;
@@ -379,7 +373,6 @@ int LzmaDecode(CLzmaDecoderState *vs,
if (rep0 > nowPos)
return LZMA_RESULT_DATA_ERROR;
-
do
{
previousByte = outStream[nowPos - rep0];
@@ -391,7 +384,6 @@ int LzmaDecode(CLzmaDecoderState *vs,
}
RC_NORMALIZE;
-
*inSizeProcessed = (SizeT)(Buffer - inStream);
*outSizeProcessed = nowPos;
return LZMA_RESULT_OK;
diff --git a/payloads/libpayload/liblzma/lzmadecode.h b/payloads/libpayload/liblzma/lzmadecode.h
index 34c9f14c33..05ff0a3397 100644
--- a/payloads/libpayload/liblzma/lzmadecode.h
+++ b/payloads/libpayload/liblzma/lzmadecode.h
@@ -32,7 +32,6 @@ typedef UInt32 SizeT;
#define LZMA_RESULT_OK 0
#define LZMA_RESULT_DATA_ERROR 1
-
#define LZMA_BASE_SIZE 1846
#define LZMA_LIT_SIZE 768
@@ -56,10 +55,8 @@ typedef struct _CLzmaDecoderState
CLzmaProperties Properties;
CProb *Probs;
-
} CLzmaDecoderState;
-
int LzmaDecode(CLzmaDecoderState *vs,
const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed);