8000 Clearing the general purpose flag · Issue #440 · zlib-ng/minizip-ng · GitHub
[go: up one dir, main page]

Skip to content

Clearing the general purpose flag  #440

Closed

Description

@wuanne15

Hi!
I’ve been working on moving my code from version 1.1 of mini zip to version 2.8.9, but I’ve been encountering some issues. Currently my code reads the length of a file from the file header. The problem is that the local header file in the zip file no longer has the uncompressed size of the file, but instead the file descriptor contains it. I read in appnotes.txt that if the 3rd bit of the general purpose flags is set then the CRC-32 and uncompressed size fields are set to be zero in the local header and the correct values are put in the data descriptor and central directory. I checked the hexdump of the newly generated zip file, and the 3rd bit of the general purpose flag is indeed set. Thus I was wondering how I can disable this so that the uncompressed file size and crc-32 data are contained in the local header file instead of the data descriptors.

I'm using the function zipWriteInFileInZip.

Thanks so much!

Activity

  1. nmoinvaz commented on Jan 4, 2020

    @nmoinvaz
    Member

    I have made a commit that will allow you to set call mz_zip_set_data_descriptor(handle, 0) in the dev branch.

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

    fixedIssue or bug has been fixednew featureNew feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0