PHPZipStreamer icon indicating copy to clipboard operation
PHPZipStreamer copied to clipboard

Add data descriptor header

Open rullzer opened this issue 8 years ago • 9 comments

As specified in 4.3.9.3 and 4.3.9.4

4.3.9.3 Although not originally assigned a signature, the value 0x08074b50 has commonly been adopted as a signature value for the data descriptor record. Implementers should be aware that ZIP files may be encountered with or without this signature marking data descriptors and SHOULD account for either case when reading ZIP files to ensure compatibility.

4.3.9.4 When writing ZIP files, implementors SHOULD include the signature value marking the data descriptor record. When the signature is used, the fields currently defined for the data descriptor record will immediately follow the signature.

This (in zip32) makes the generated files work on the default OSX app.

rullzer avatar Jan 31 '18 21:01 rullzer

Seems the tests are not happy. Must be the extra 4 bytes. I can look into fixing the tests later.

rullzer avatar Feb 01 '18 10:02 rullzer

@rullzer tests are broken on master as well - this repo seems dead-ish

I fixed the tests and some other bugs in my own fork - https://github.com/DeepDiver1975/PHPZipStreamer

Feel welcome to contribute there.

Cheers!

DeepDiver1975 avatar Feb 01 '18 10:02 DeepDiver1975

@DeepDiver1975 good to know will do that then :)

rullzer avatar Feb 01 '18 11:02 rullzer

@DeepDiver1975 don't understand what to do with your own fork. Could you please explain it to me i'm using owncloud 9.1.x on Ubunut 16.04

bitzebou avatar Jul 17 '18 11:07 bitzebou

@DeepDiver1975 don't understand what to do with your own fork. Could you please explain it to me i'm using owncloud 9.1.x on Ubunut 16.04

Getting the latest release of owncloud will give you the necessary changes to this library. Just upgrade and you'll be happy.

DeepDiver1975 avatar Jul 17 '18 12:07 DeepDiver1975

@DeepDiver1975 i already made a test (with a newinstallation of owncloud-10.0.8 and nextcloud-13.0.4) but in both versions i had the problem with 7-Zip (Headers Error) when downloading a shared folder (with for exampler multiple PDF Files) owncloud9.1.x (is our productive cloud)

bitzebou avatar Jul 17 '18 12:07 bitzebou

@DeepDiver1975 i already made a test (with a newinstallation of owncloud-10.0.8 and nextcloud-13.0.4) but in both versions i had the problem with 7-Zip (Headers Error) when downloading a shared folder (with for exampler multiple PDF Files) owncloud9.1.x (is our productive cloud)

please head over to https://central.owncloud.org/ to seek for help. Maybe there is one corner case missing? We will have a look.

DeepDiver1975 avatar Jul 17 '18 13:07 DeepDiver1975

sorry don't know what to do there. could you only explain me wether in nextcloud-13.0.4 and/or owncloud-10.0.8 the issue with zip (and Header Error) should be solved?

bitzebou avatar Jul 17 '18 13:07 bitzebou

owncloud-10.0.8 the issue with zip (and Header Error) should be solved?

I can only speak for owncloud and yes - this issue should be solved with 10.0.8. In case you are facing a different issue I'd appreciate a bug report to get deeper into analysis. THX

DeepDiver1975 avatar Jul 17 '18 14:07 DeepDiver1975