mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-14 22:11:38 -06:00
4.27 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
31e7b924e8
commit
d66cf2fcf3
@@ -2,7 +2,7 @@
|
||||
LzmaDecodeSize.c
|
||||
LZMA Decoder (optimized for Size version)
|
||||
|
||||
LZMA SDK 4.22 Copyright (c) 1999-2005 Igor Pavlov (2005-06-10)
|
||||
LZMA SDK 4.27 Copyright (c) 1999-2005 Igor Pavlov (2005-08-07)
|
||||
http://www.7-zip.org/
|
||||
|
||||
LZMA SDK is licensed under two licenses:
|
||||
@@ -66,17 +66,14 @@ Byte RangeDecoderReadByte(CRangeDecoder *rd)
|
||||
/* #define ReadByte (*rd->Buffer++) */
|
||||
#define ReadByte (RangeDecoderReadByte(rd))
|
||||
|
||||
void RangeDecoderInit(CRangeDecoder *rd,
|
||||
#ifdef _LZMA_IN_CB
|
||||
ILzmaInCallback *inCallback
|
||||
#else
|
||||
const Byte *stream, SizeT bufferSize
|
||||
void RangeDecoderInit(CRangeDecoder *rd
|
||||
#ifndef _LZMA_IN_CB
|
||||
, const Byte *stream, SizeT bufferSize
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int i;
|
||||
#ifdef _LZMA_IN_CB
|
||||
rd->InCallback = inCallback;
|
||||
rd->Buffer = rd->BufferLim = 0;
|
||||
#else
|
||||
rd->Buffer = stream;
|
||||
@@ -398,6 +395,7 @@ int LzmaDecode(CLzmaDecoderState *vs,
|
||||
rd.Range = vs->Range;
|
||||
rd.Code = vs->Code;
|
||||
#ifdef _LZMA_IN_CB
|
||||
rd.InCallback = InCallback;
|
||||
rd.Buffer = vs->Buffer;
|
||||
rd.BufferLim = vs->BufferLim;
|
||||
#else
|
||||
@@ -432,11 +430,9 @@ int LzmaDecode(CLzmaDecoderState *vs,
|
||||
distanceLimit = 0;
|
||||
dictionaryPos = 0;
|
||||
dictionary[dictionarySize - 1] = 0;
|
||||
RangeDecoderInit(&rd,
|
||||
#ifdef _LZMA_IN_CB
|
||||
InCallback
|
||||
#else
|
||||
inStream, inSize
|
||||
RangeDecoderInit(&rd
|
||||
#ifndef _LZMA_IN_CB
|
||||
, inStream, inSize
|
||||
#endif
|
||||
);
|
||||
#ifdef _LZMA_IN_CB
|
||||
@@ -486,11 +482,12 @@ int LzmaDecode(CLzmaDecoderState *vs,
|
||||
p[i] = kBitModelTotal >> 1;
|
||||
}
|
||||
|
||||
RangeDecoderInit(&rd,
|
||||
#ifdef _LZMA_IN_CB
|
||||
InCallback
|
||||
#else
|
||||
inStream, inSize
|
||||
#ifdef _LZMA_IN_CB
|
||||
rd.InCallback = InCallback;
|
||||
#endif
|
||||
RangeDecoderInit(&rd
|
||||
#ifndef _LZMA_IN_CB
|
||||
, inStream, inSize
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ LzmaTest.c
|
||||
Test application for LZMA Decoder
|
||||
|
||||
This file written and distributed to public domain by Igor Pavlov.
|
||||
This file is part of LZMA SDK 4.26 (2005-08-02)
|
||||
This file is part of LZMA SDK 4.26 (2005-08-05)
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -173,12 +173,12 @@ int main3(FILE *inFile, FILE *outFile, char *rs)
|
||||
|
||||
if (state.Probs == 0
|
||||
#ifdef _LZMA_OUT_READ
|
||||
|| state.Dictionary == 0 && state.Properties.DictionarySize != 0
|
||||
|| (state.Dictionary == 0 && state.Properties.DictionarySize != 0)
|
||||
#else
|
||||
|| outStream == 0 && outSizeFull != 0
|
||||
|| (outStream == 0 && outSizeFull != 0)
|
||||
#endif
|
||||
#ifndef _LZMA_IN_CB
|
||||
|| inStream == 0 && compressedSize != 0
|
||||
|| (inStream == 0 && compressedSize != 0)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@@ -307,7 +307,7 @@ int main2(int numArgs, const char *args[], char *rs)
|
||||
FILE *outFile = 0;
|
||||
int res;
|
||||
|
||||
sprintf(rs + strlen(rs), "\nLZMA Decoder 4.26 Copyright (c) 1999-2005 Igor Pavlov 2005-08-02\n");
|
||||
sprintf(rs + strlen(rs), "\nLZMA Decoder 4.26 Copyright (c) 1999-2005 Igor Pavlov 2005-08-05\n");
|
||||
if (numArgs < 2 || numArgs > 3)
|
||||
{
|
||||
sprintf(rs + strlen(rs), "\nUsage: lzmadec file.lzma [outFile]\n");
|
||||
|
||||
Reference in New Issue
Block a user