Skip to content

unzGetCurrentFileZStreamPos64 is missing #848

@berolinux

Description

@berolinux

The function unzGetCurrentFileZStreamPos64 - present in the original minizip - doesn't exist in minizip-ng, but is used out there in the wild, most notably by chromium and chromium derived projects.

I've tried to get Chromium to work with zlib-ng+minizip-ng instead of using its bundled copies of zlib+minizip and am almost there (it works in general, but crashes when installing extensions). I think I'm misunderstanding what unzGetCurrentFileZStreamPos64 is expected to do.

https://github.com/OpenMandrivaAssociation/chromium/blob/master/chromium-105-minizip-ng.patch#L28-L31

My guess at what it should do is probably somewhat off (not a zlib/minizip expert...):

uint64_t unzGetCurrentFileZStreamPos64(unzFile zf) {
  unz64_file_pos pos;
  unzGetFilePos64(zf, &pos);
  return pos.pos_in_zip_directory;
}

Would be nice to see unzGetCurrentFileZStreamPos64 in minizip-ng (or alternatively, get a hint on how to port that one missing line correctly).

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