wqweto / ZipArchive

A single-class pure VB6 library for zip with ASM speed
MIT License
52 stars 22 forks source link

Size of archive exceeds 2GB #17

Closed Seniorchef closed 3 years ago

Seniorchef commented 3 years ago

Thank you for the code.

I tested it with the attached sample program with a different .addfromfolder-command in command1 to my testdata (folder with subfolders, 3.5gb of about 3k documents).

When compressing this folder I get an error -1 "overflow" and the compressing stops. Before that error 131 in pvVfsSeek is raised because of a negative lPosition value.

Do you have an idea to solve this issue to compress to archives larger than 2 gb?

wqweto commented 3 years ago

Checkout the ToDo (not supported yet) section of the repo's README.

This is more complicated that just an error in pvVfsSeek as the original ZIP format has a 2GB file size limit.

You might solve this issue by implementing Zip64 support which has different internal structures needed to accomodate for expanded 64-bit file sizes.

Seniorchef commented 3 years ago

Hi, Vladimir!

Thanks for your reply - that was fast!

So I will change back to your vszlib classes that I used before. They work fine, but I don't understand how to create ZIP-Archives with these classes (that’s why I tried the ZipArchive-Class). Is it just naming the archive ".zip" in the compress-Method?

I tried the sample in the Readme, but my result is a 0 byte archive. Do I miss somethong?

Thanks for your efforts

Jo (seniorchef)

Von: Vladimir Vissoultchev @.*** Gesendet: Donnerstag, 27. Mai 2021 10:19 An: wqweto/ZipArchive Cc: Seniorchef; Author Betreff: Re: [wqweto/ZipArchive] Size of archive exceeds 2GB (#17)

Checkout the ToDo (not supported yet) section of the repo's README.

This is more complicated that just an error in pvVfsSeek as the original ZIP format has a 2GB file size limit.

You might solve this issue by implementing Zip64 support which has different internal structures needed to accomodate for expanded 64-bit file sizes.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wqweto/ZipArchive/issues/17#issuecomment-849437383 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AUHXR6N4UV4Y473C4VVCJ4LTPX57RANCNFSM45TWANSA . https://github.com/notifications/beacon/AUHXR6OOVRXZZOA7Z4Y56ILTPX57RA5CNFSM45TWANSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGKQWFRY.gif

wqweto commented 3 years ago

Do I miss somethong?

You can try 7z.dll from version 9.22 of 7-zip because newer versions are not tested (and probably not supported).

You can use the Init method to initilize the library with the exact c:\path\to\7z.dll file with the specific DLL version.

Seniorchef commented 3 years ago

Thanks again, Vladimir!

I was unclear in my mail: the sample works fine when I name the archive "Sample.7z" and it works not when I call it "Sample.Zip".

The dll is in place and found by the routine. I already included the class in my app.

But I don't know how to make the class create a zip-archive instead of creating a 7z-archive. I (and my clients) prefer zip-archives. They can be extracted without extra tools (thought 7z is an excellent one).

It would be fine to have one class to create zip and 7z archives (even better to create zip with more than 2gb). That is what I understood the 7z.dll can do, and that is what I hoped to get from your sample.

Regards

Jo

Von: Vladimir Vissoultchev @.*** Gesendet: Donnerstag, 27. Mai 2021 16:12 An: wqweto/ZipArchive Cc: Seniorchef; Author Betreff: Re: [wqweto/ZipArchive] Size of archive exceeds 2GB (#17)

Do I miss somethong?

You can try 7z.dll from version 9.22 https://sourceforge.net/projects/sevenzip/files/7-Zip/9.22/ of 7-zip because newer versions are not tested (and probably not supported).

You can use the Init method to initilize the library with the exact c:\path\to\7z.dll file with the specific DLL version.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wqweto/ZipArchive/issues/17#issuecomment-849668817 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AUHXR6MAANTIGAOJEOLYKWLTPZHMJANCNFSM45TWANSA . https://github.com/notifications/beacon/AUHXR6NCB5QXYLQN6GBAH3TTPZHMJA5CNFSM45TWANSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGKSOVUI.gif

wqweto commented 3 years ago

There is a Create zip file with unicode filenames section in VszLib repo's README -- I thought you were talking about it when you said "I tried the sample in the Readme, but my result is a 0 byte archive" as there is no other sample that produces ZIP files.

Again, you have to use version 9.22 of the 7z.dll to be able to produce ZIP files. Newer versions of 7z.dll tend to not work well with VszLib and can successfully produce only 7z files.