Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unzipped file is different from original #5

Open
jhjulkun opened this issue May 17, 2017 · 3 comments
Open

unzipped file is different from original #5

jhjulkun opened this issue May 17, 2017 · 3 comments

Comments

@jhjulkun
Copy link

jhjulkun commented May 17, 2017

Thanks for creating the plugin!

However, it seems its not correct when unzipping binary files.

I tried creating a random file, and when comparing the original file with the unzipped version the files are different!

Since I could not find any examples online this is how the test file was created:

dd if=/dev/urandom bs=100k count=1 of=random.raw; zip test.zip random.raw

I can also provide the test files I used if that's easier for you.

Thanks!

@FortuneN
Copy link
Owner

Please do provide test files &
Let me know which platform (iOS, android or windows)

@jhjulkun
Copy link
Author

Fails on windows.
Did not try on iOS or Android since I'm using the existing zip plugin for those (so far)

Thanks for the plugin, would be great with one unified zip plugin!

test.zip

@jhjulkun
Copy link
Author

jhjulkun commented Jul 4, 2017

Any ideas ?
I found out that there is a encoding parameter that could explain the issue, but even after trying something it didn't unzip correctly (I'm not a c# guy so I most likely did something wrong).
But suspect since data isn't UTF-8 encoded (most likely its 8859-1, not sure since its binary data).

entryNameEncoding
Type: System.Text.Encoding
The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names.
https://msdn.microsoft.com/en-us/library/hh875102(v=vs.110).aspx

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

No branches or pull requests

2 participants