mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-10 20:07:05 -06:00
23.01
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// BZip2Crc.h
|
||||
|
||||
#ifndef __BZIP2_CRC_H
|
||||
#define __BZIP2_CRC_H
|
||||
#ifndef ZIP7_INC_BZIP2_CRC_H
|
||||
#define ZIP7_INC_BZIP2_CRC_H
|
||||
|
||||
#include "../../Common/MyTypes.h"
|
||||
|
||||
@@ -11,10 +11,10 @@ class CBZip2Crc
|
||||
static UInt32 Table[256];
|
||||
public:
|
||||
static void InitTable();
|
||||
CBZip2Crc(UInt32 initVal = 0xFFFFFFFF): _value(initVal) {};
|
||||
CBZip2Crc(UInt32 initVal = 0xFFFFFFFF): _value(initVal) {}
|
||||
void Init(UInt32 initVal = 0xFFFFFFFF) { _value = initVal; }
|
||||
void UpdateByte(Byte b) { _value = Table[(_value >> 24) ^ b] ^ (_value << 8); }
|
||||
void UpdateByte(unsigned int b) { _value = Table[(_value >> 24) ^ b] ^ (_value << 8); }
|
||||
void UpdateByte(unsigned b) { _value = Table[(_value >> 24) ^ b] ^ (_value << 8); }
|
||||
UInt32 GetDigest() const { return _value ^ 0xFFFFFFFF; }
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ class CBZip2CombinedCrc
|
||||
{
|
||||
UInt32 _value;
|
||||
public:
|
||||
CBZip2CombinedCrc(): _value(0){};
|
||||
CBZip2CombinedCrc(): _value(0) {}
|
||||
void Init() { _value = 0; }
|
||||
void Update(UInt32 v) { _value = ((_value << 1) | (_value >> 31)) ^ v; }
|
||||
UInt32 GetDigest() const { return _value ; }
|
||||
|
||||
Reference in New Issue
Block a user