source: freewrt/tools/lzma/patches/patch-C_7zip_Compress_LZMA_LZMADecoder_cpp

freewrt_2_0
Last change on this file was 4111e0f, checked in by Thorsten Glaser <tg@…>, 19 years ago

PR #86

git-svn-id: svn://www.freewrt.org/trunk/freewrt@702 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 971 bytes
Line 
1$FreeWRT$
2--- w-lzma-432-.orig/C/7zip/Compress/LZMA/LZMADecoder.cpp 2006-09-24 19:56:53.000000000 +0200
3+++ w-lzma-432-/C/7zip/Compress/LZMA/LZMADecoder.cpp 2006-09-24 00:54:28.000000000 +0200
4@@ -274,12 +274,17 @@ STDMETHODIMP CDecoder::SetDecoderPropert
5 Byte remainder = (Byte)(properties[0] / 9);
6 int lp = remainder % 5;
7 int pb = remainder / 5;
8- if (pb > NLength::kNumPosStatesBitsMax)
9- return E_INVALIDARG;
10- _posStateMask = (1 << pb) - 1;
11 UInt32 dictionarySize = 0;
12 for (int i = 0; i < 4; i++)
13 dictionarySize += ((UInt32)(properties[1 + i])) << (i * 8);
14+ return SetDecoderPropertiesRaw(lc, lp, pb, dictionarySize);
15+}
16+
17+STDMETHODIMP CDecoder::SetDecoderPropertiesRaw(int lc, int lp, int pb, UInt32 dictionarySize)
18+{
19+ if (pb > NLength::kNumPosStatesBitsMax)
20+ return E_INVALIDARG;
21+ _posStateMask = (1 << pb) - 1;
22 if (!_outWindowStream.Create(dictionarySize))
23 return E_OUTOFMEMORY;
24 if (!_literalDecoder.Create(lp, lc))
Note: See TracBrowser for help on using the repository browser.