This commit is contained in:
Igor Pavlov
2010-10-04 00:00:00 +00:00
committed by Kornel Lesiński
parent 044e4bb741
commit 2eb60a0598
105 changed files with 868 additions and 466 deletions

View File

@@ -10,8 +10,9 @@
namespace NCompress {
namespace NBZip2 {
#define NO_INLINE MY_FAST_CALL
#undef NO_INLINE
#define NO_INLINE
static const UInt32 kNumThreadsMax = 4;
static const UInt32 kBufferSize = (1 << 17);
@@ -422,7 +423,7 @@ CDecoder::CDecoder()
m_States = 0;
m_NumThreadsPrev = 0;
NumThreads = 1;
#endif;
#endif
_needInStreamInit = true;
}

View File

@@ -9,8 +9,10 @@
#include "DeflateEncoder.h"
#if _MSC_VER >= 1300
#define NO_INLINE __declspec(noinline)
#undef NO_INLINE
#ifdef _MSC_VER
#define NO_INLINE MY_NO_INLINE
#else
#define NO_INLINE
#endif
@@ -580,7 +582,7 @@ NO_INLINE UInt32 Huffman_GetPrice(const UInt32 *freqs, const Byte *lens, UInt32
for (i = 0; i < num; i++)
price += lens[i] * freqs[i];
return price;
};
}
NO_INLINE UInt32 Huffman_GetPrice_Spec(const UInt32 *freqs, const Byte *lens, UInt32 num, const Byte *extraBits, UInt32 extraBase)
{

View File

@@ -164,7 +164,7 @@ void CDecoder::ClearPrevLevels()
m_LastMainLevels[i] = 0;
for (i = 0; i < kNumLenSymbols; i++)
m_LastLenLevels[i] = 0;
};
}
HRESULT CDecoder::CodeSpec(UInt32 curSize)

View File

@@ -778,13 +778,13 @@ struct StandardFilterSignature
}
kStdFilters[]=
{
53, 0xad576887, SF_E8,
57, 0x3cd7e57e, SF_E8E9,
120, 0x3769893f, SF_ITANIUM,
29, 0x0e06077d, SF_DELTA,
149, 0x1c2c5dc8, SF_RGB,
216, 0xbc85e701, SF_AUDIO,
40, 0x46b9c560, SF_UPCASE
{ 53, 0xad576887, SF_E8 },
{ 57, 0x3cd7e57e, SF_E8E9 },
{ 120, 0x3769893f, SF_ITANIUM },
{ 29, 0x0e06077d, SF_DELTA },
{ 149, 0x1c2c5dc8, SF_RGB },
{ 216, 0xbc85e701, SF_AUDIO },
{ 40, 0x46b9c560, SF_UPCASE }
};
static int FindStandardFilter(const Byte *code, UInt32 codeSize)