📄 archivebase.cpp
字号:
#include "ArchiveBase.h"
extern "C" {
#include "lib/7zip/7zCrc.h"
};
unsigned int CArchiveBase::GetCrc32 (const string& fileName)
{
UInt32 crc;
unsigned char buffer [65536];
int handle;
CrcInit(&crc);
handle = this->OpenFile(fileName);
if (handle == 0) return CrcGetDigest(&crc);
while (!this->Eof(handle)) {
int maxRead = this->ReadFile(handle, &buffer, sizeof(buffer));
CrcUpdate (&crc, buffer, maxRead);
}
this->CloseFile(handle);
return CrcGetDigest(&crc);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -