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

📄 cabinet.cpp

📁 这个代码用于生成一个能用的用于压缩和解压缩微软CAB格式文件的库。
💻 CPP
字号:

#include "Cabinet.hpp"

using namespace Cabinet;

void main(int argc, char **argv)
{
	CMain i_Main;
	i_Main.RunDemo();
}

void CMain::RunDemo()
{
	// This is an ID which is written (invisible) into the CAB file
	UINT u32_CabID = 12345;

	// Store filetimes as UTC in CAB files while compression
	BOOL b_StoreUtcTime = TRUE;

	// TRUE  -> If a filename has characters > 0x7F, encode it using UTF8
	// FALSE -> Store ANSI filenames unchanged, read documentation!
	BOOL b_EncodeUtf = TRUE;

	// Change this to split the archive into multiple files (200000 --> CAB split size = 200kB)
	// ATTENTION: In this case Parameter 1 of CreateFCIContext MUST contain "%d" or "%03u"...
	UINT u32_SplitSize = 0x7FFFFFFF;

	// FALSE = store in CAB file without compression
	BOOL b_Compress = TRUE;

	// TRUE -> don't write any file to disk, all files are passed in OnAfterCopyFile()
	BOOL b_ExtractToMemory = FALSE;

	// You can specify your own key for CAB encryption here (the longer the more secure, up to 72 characters or bytes)
	// Set empty EncryptionKey ("") to get a CAB file without encryption
	char* s8_EncryptionKey = "";
//	char* s8_EncryptionKey = "AH%KJ/76?K逪謀\狞dghf7(ZTbjsf82iz<sx87qc5ba&m;-@^l#jeL9/)$D2@rTbZ<

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -