upgraded to lzma sdk 4.43 for faster compression
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4772 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
51a96f2d75
commit
2cd2142ca3
42 changed files with 1900 additions and 1572 deletions
|
@ -28,24 +28,30 @@ public:
|
|||
CCRCTableInit() { CCRC::InitTable(); }
|
||||
} g_CRCTableInit;
|
||||
|
||||
void CCRC::Update(Byte b)
|
||||
void CCRC::UpdateByte(Byte b)
|
||||
{
|
||||
_value = Table[((Byte)(_value)) ^ b] ^ (_value >> 8);
|
||||
}
|
||||
|
||||
void CCRC::Update(UInt32 v)
|
||||
void CCRC::UpdateUInt16(UInt16 v)
|
||||
{
|
||||
UpdateByte(Byte(v));
|
||||
UpdateByte(Byte(v >> 8));
|
||||
}
|
||||
|
||||
void CCRC::UpdateUInt32(UInt32 v)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
Update((Byte)(v >> (8 * i)));
|
||||
UpdateByte((Byte)(v >> (8 * i)));
|
||||
}
|
||||
|
||||
void CCRC::Update(const UInt64 &v)
|
||||
void CCRC::UpdateUInt64(UInt64 v)
|
||||
{
|
||||
for (int i = 0; i < 8; i++)
|
||||
Update((Byte)(v >> (8 * i)));
|
||||
UpdateByte((Byte)(v >> (8 * i)));
|
||||
}
|
||||
|
||||
void CCRC::Update(const void *data, UInt32 size)
|
||||
void CCRC::Update(const void *data, size_t size)
|
||||
{
|
||||
UInt32 v = _value;
|
||||
const Byte *p = (const Byte *)data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue