8000 Make [mz_zip.c] more modular · Issue #478 · zlib-ng/minizip-ng · GitHub
[go: up one dir, main page]

Skip to content

Make [mz_zip.c] more modular #478

Closed
Closed

Description

@karimhm

In mz_zip.c the library check for both, HAVE_ZLIB and HAVE_LIBCOMP flags and then uses the Zlib interface even though on Apple platforms it might use the Libcomp interface that is "Catfishing" Zlib.

https://github.com/nmoinvaz/minizip/blob/b39f7a0e896615833a5af9dc7134563917a3a227/mz_zip.c#L1885-L1888

Wouldn't something like be better?

#if defined(HAVE_ZLIB)
    else if (zip->file_info.compression_method == MZ_COMPRESS_METHOD_DEFLATE)
        mz_stream_zlib_create(&zip->compress_stream);
#endif
#if defined(HAVE_LIBCOMP)
    else if (zip->file_info.compression_method == MZ_COMPRESS_METHOD_DEFLATE)
        mz_stream_libcomp_create(&zip->compress_stream);
#endif

Activity

  1. karimhm commented on May 10, 2020

    @karimhm
    Author

    When trying to compile the library on Apple platform mz_strm_zlib.[h/c] and mz_strm_libcomp.[h/c] cannot coexist due to duplicated symbols issue.

  2. nmoinvaz commented on May 26, 2020

    @nmoinvaz
    Member

    Are you using CMake to generate xcode project? It should prevent this type of scenario.

  3. karimhm commented on May 26, 2020

    @karimhm
    Author

    No I'm using Swift Package Manager. I manually copied source files.

  4. SilenceWater commented on Aug 16, 2020

    @SilenceWater

    Making the project private with CocoapoDS won't unzip

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0