⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 archivebase.cpp

📁 这是整套横扫千军3D版游戏的源码
💻 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 + -