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

mz_compat: sync parameter types with minizip1, add 2 compatibility wrappers #529

Merged
merged 1 commit into from
Nov 4, 2020
Merged

mz_compat: sync parameter types with minizip1, add 2 compatibility wrappers #529

merged 1 commit into from
Nov 4, 2020

Conversation

vszakats
Copy link
Contributor

  • zipOpenNewFileInZip*(): method/compression_method is 'int' in minizip1
  • zipCloseFileInZipRaw64(): uncompressed_size is 'ZPOS64_T', which is 'uint64_t'
  • unzTell64(): return value is 'ZPOS64_T', which is 'uint64_t'
  • unztell(): return value should be 32-bit
  • add unztell64() (full lowercase), which is the same as unzTell64()
  • add unzeof(), which is the same as unzEndOfFile()

NOTE: It'd be probably useful to update mz_zip_entry_close_raw() uncompressed_size type to unsigned.

…wrappers

- zipOpenNewFileInZip*(): method/compression_method is 'int' in minizip1
- zipCloseFileInZipRaw64(): uncompressed_size is 'ZPOS64_T', which is 'uint64_t'
- unzTell64(): return value is 'ZPOS64_T', which is 'uint64_t'
- unztell(): return value should be 32-bit
- add unztell64() (full lowercase), which is the same as unzTell64()
- add unzeof(), which is the same as unzEndOfFile()

NOTE: It'd be probably useful to update mz_zip_entry_close_raw() uncompressed_size
      type to unsigned.
@nmoinvaz nmoinvaz merged commit ed03eed into zlib-ng:dev Nov 4, 2020
@nmoinvaz
Copy link
Member

nmoinvaz commented Nov 4, 2020

NOTE: It'd be probably useful to update mz_zip_entry_close_raw() uncompressed_size type to unsigned.

Can you please explain?

@vszakats
Copy link
Contributor Author

vszakats commented Nov 4, 2020

This way the lower level type would match the type of higher level (compatibility) APIs, and it would also match the unsigned type used throughout the original minizip library. Given the file sizes involved, it's rather an academic than practical issue.

Thank you for merging!

@nmoinvaz
Copy link
Member

nmoinvaz commented Nov 4, 2020

I think I am okay with leaving it as is for now. I use int64_t for compressed size and uncompressed size in a few places. Thanks a lot for your PR and work!

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.

2 participants