如何在c/c ++中压缩文件?因为我想开发像WinZip/WinRAR这样的应用程序.一个更简单的.
我正在尝试构建7zip代码,我可以在我的Windows移动项目中使用..任何人都知道如何构建7zip代码并在Windows移动应用程序中使用相同的代码.
我正在尝试使用Delphi 2007使用JEDI JCL压缩一些文件.问题是我无法弄清楚为什么我一直得到这个错误" Sevenzip: Failed to load 7z.dll"
我的代码是:
var
archiveclass: TJclDecompressArchiveClass;
archive: TJclDecompressArchive;
item: TJclCompressionItem;
s: String;
i: Integer;
begin
archiveclass := GetArchiveFormats.FindDecompressFormat(dir);
if not Assigned(archiveclass) then
raise Exception.Create('Could not determine the Format of ' + dir);
archive := archiveclass.Create(dir);
try
if not (archive is TJclSevenZipDecompressArchive) then
raise Exception.Create('This format is not handled by 7z.dll');
archive.ListFiles;
s := Format('test.zip Item Count: %d'#13#10#13#10, [archive.ItemCount]);
for i := 0 to archive.ItemCount - 1 do
begin
item := archive.Items[i];
case item.Kind …Run Code Online (Sandbox Code Playgroud) 我想解压缩从网络服务器下载的 .7z 文件。我已经搜索了解决方案,但我只找到了必须安装 7zip 的地方。
有没有简单的方法来解压这些文件?
我已经有一个“foreach”,它循环遍历包含文件名的列表中的项目。