login about faq

I use CkZip C++ v9.5.0.58 in an application that runs on Windows. This application uses CkZip to store large numbers of small jpg files, so no compression.

Performance is important and so I have always used QuickAppend when adding new files to existing zip archives.

I am finding that when we use QuickAppend to add a small file (for example 2KB) file to a zip containing many (for example several thousand) similar small files, the file grows by an amount significantly larger than the added file.

I believe what is happening is that the central directory at the end of the existing zip file is large due to the high count of files in the zip. When the central directory is larger than the data being added, the new data only partially overwrites the old central directory. The new central directory is then appended to the end of the zip, leaving a large remnant of the old central directory. This repeats for each new added file, compounding the problem. We are seeing zip files that are 3 or 4 times larger than all the constituent files. This is bad for us because one of the reasons for using zip is to efficiently pack the files for optimal file-system storage.

If I have understood the problem correctly, is it possible to make QuickAppend add the new central directory to the end of the new file entry segment rather than at the end of the file? When adding a new file, the new central directory will always be larger than the previous one, ensuring that the old data is completely over-written, leaving the end of central directory record correctly at the end of the file.

Has anyone else seen this problem and found a solution?

I can supply an example zip file showing the problem if needed.

asked Sep 01 at 23:08

MGD's gravatar image

MGD
3


link

answered Sep 02 at 08:07

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Thanks that fixed the problem for me.

(Sep 02 at 10:46) MGD

This was already fixed. Please let me know the exact build you need (MSVC++ version) or other operating system, and I will upload the latest pre-release tomorrow.

link

answered Sep 01 at 23:26

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Currently using MS VC++ 2015. win32 but planning to use x64 soon.

Thanks for the quick response.

(Sep 01 at 23:37) MGD

Hi MGD

I was just checking in to see whether this had solved the issue for you. I, too was having problems just prior to this; although mine resulted in errors when unzipping. I have tested the latest Node versions, and am still seeing the problem. I guess they're related. Here's a link to that thread:

http://www.chilkatforum.com/questions/10902/problems-with-quickappend-extra-entry-after-central-directory-found

Tom

link

answered yesterday

tomkerswill's gravatar image

tomkerswill
1

Hi tomkerswill,

I am still using the pre-release 9.5.0.59 supplied by chilkat and this problem has not recurred for us. I have not seen any evidence of errors when unzipping so can't say for sure sure that this is the same problem that you are experiencing. Our application also uses Chilkat to unzip so I guess it copes with the dead space better than some other zip applications do.

link

answered yesterday

MGD's gravatar image

MGD
3

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×87
×65
×21

Asked: Sep 01 at 23:08

Seen: 220 times

Last updated: yesterday

powered by OSQA