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

uncompressed_size is not right #685

Open
bdtren opened this issue Sep 13, 2023 · 1 comment
Open

uncompressed_size is not right #685

bdtren opened this issue Sep 13, 2023 · 1 comment

Comments

@bdtren
Copy link

bdtren commented Sep 13, 2023

Steps to reproduce

  1. Have a big zip file. (My zip file is 4.5GB unzipped and 330MB zipped with only 1 DB file inside)
  2. call NSNumber *wantedFileSize = [SSZipArchive payloadSizeForArchiveAtPath:path error:&error];
  3. Check the value of wantedFileSize

Expected behavior

Value of wantedFileSize is the uncompressed size (4.5GB)

Actual behavior

Value of wantedFileSize is just 928MB

Version of ZipArchive

Tested in 2.2.0 and 2.5.4

Environmental information

iPhone XS (iOS 16.3.1)
iPhone 14 Pro Max (iOS 16.1)

PS: I checked function payloadSizeForArchiveAtPath and can be sure that the issue is from fileInfo.uncompressed_size as it is showing that same value 928MB (9726543314)

@Coeur
Copy link
Member

Coeur commented Sep 16, 2023

Maybe there are symlinks in the archive?
Depending of the operating system, symlinks may or may not count toward the final uncompressed_size.
Can we get insight of which tool you used to create that archive?

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

No branches or pull requests

2 participants