Skip to content

Comments

Add data descriptor header#40

Open
rullzer wants to merge 11 commits intoMcNetic:masterfrom
rullzer:data_descriptor_header
Open

Add data descriptor header#40
rullzer wants to merge 11 commits intoMcNetic:masterfrom
rullzer:data_descriptor_header

Conversation

@rullzer
Copy link

@rullzer rullzer commented Jan 31, 2018

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
Copy link
Author

rullzer commented Feb 1, 2018

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

@DeepDiver1975
Copy link

@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!

@rullzer
Copy link
Author

rullzer commented Feb 1, 2018

@DeepDiver1975 good to know will do that then :)

@rullzer rullzer force-pushed the data_descriptor_header branch 2 times, most recently from b061997 to bc2fd5d Compare March 8, 2018 07:37
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.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer rullzer force-pushed the data_descriptor_header branch from bc2fd5d to a910389 Compare March 8, 2018 07:40
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@bitzebou
Copy link

@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

@DeepDiver1975
Copy link

@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.

@bitzebou
Copy link

@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)

@DeepDiver1975
Copy link

@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.

@bitzebou
Copy link

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?

@DeepDiver1975
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants