Lazarus中文社区

 找回密码
 立即注册(注册审核可向QQ群索取)

QQ登录

只需一步,快速开始

Lazarus IDE and 组件 下载地址版权申明
查看: 1866|回复: 0

最近从typhon32中找到的两个文件压缩源代码,很好用

[复制链接]

该用户从未签到

发表于 2015-1-8 08:19:35 | 显示全部楼层 |阅读模式
本帖最后由 cuibq 于 2015-1-8 17:40 编辑

原始代码位于:
C:\codetyphon\CodeOcean\Abbrevia\samples\ExZipper
C:\codetyphon\CodeOcean\Abbrevia\samples\ExFilter





  部分代码:

  AbZipper1.Filename := sZipPathName;
  //根据文件列表压缩
  for i := 0 to fileLists.Count - 1 do
  begin
    Application.ProcessMessages;
    if Aborting or Application.Terminated then abort;

    pbar1.Position := i;

    AbZipper1.AddFiles(fileLists.Strings, 0);

  end;

  AbZipper1.ZipfileComment := utf8ToAnsi('本压缩文件由暗箭-数据安全客户端自动生成。') + dateTimeToStr(now());
  AbZipper1.Password := spwd;
  AbZipper1.CompressionMethodToUse := smBestMethod;
  AbZipper1.DeflationOption := doFast;
  AbZipper1.Save;
  AbZipper1.CloseArchive;
  Cursor := crDefault;
  memoText.Append(dateTimeToStr(now())+' 压缩完成');
  memoText.Append('压缩包中文件与文件夹数量:' + intToStr(fileLists.Count));   


   












本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册(注册审核可向QQ群索取)

x
回复

使用道具 举报

*滑块验证:

本版积分规则

QQ|手机版|小黑屋|Lazarus中国|Lazarus中文社区 ( 鄂ICP备16006501号-1 )

GMT+8, 2025-5-2 20:49 , Processed in 0.027015 second(s), 9 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表