delphicompressiondelphi-2010jedi-code-library

Compress a file with JclCompression


I am trying to save (compress) a .zip file using JclCompression with the JCL Demo. When I press the Save button on the Read and Write Tab the demo calls:

procedure TFormMain.ActionSaveExecute(Sender: TObject);
begin
  (FArchive as TJclCompressArchive).Compress;
  CloseArchive;
end;

When (FArchive as TJclCompressArchive).Compress; is executed it produces an exception: "At least one compression volumes could not be replaced after an archive out-of-place update." Also sometimes when I press the save button, the "application is not responding" appears in the form's caption, so I have to shutdown the demo.

Is this code correct or do I have to change it to sucessfully compress and save the zip file? Are there any other demos for JclCompression so I can learn how to use these classes?

Aside from this problem the demo seems to be working correctly. I can open a zip file, create a new zip file, add files, add files from a directory, extract selected files, extract all, and get zip file properties. Saving seems to be a problem.

I am using Delphi 2010 on Windows 7.


Solution

  • Same issue as jedi-jcl-compression-library-wont-open-spanned-archive-files. JEDI JCL Compression library wont open spanned archive files

    The JCL-JVCL version you use is buggy.
    I would recommand to upgrade your JCL installation to latest daily build