You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* Byte offset of this entry in the archive's central directory. Note we currently only support up to UINT_MAX or less bytes in the central dir. */
mz_uint64m_central_dir_ofs;
/* These fields are copied directly from the zip's central dir. */
mz_uint16m_version_made_by;
mz_uint16m_version_needed;
mz_uint16m_bit_flag;
mz_uint16m_method;
/* CRC-32 of uncompressed data. */
mz_uint32m_crc32;
/* File's compressed size. */
mz_uint64m_comp_size;
/* File's uncompressed size. Note, I've seen some old archives where directory entries had 512 bytes for their uncompressed sizes, but when you try to unpack them you actually get 0 bytes. */
mz_uint64m_uncomp_size;
/* Zip internal and external file attributes. */
mz_uint16m_internal_attr;
mz_uint32m_external_attr;
/* Entry's local header file offset in bytes. */
mz_uint64m_local_header_ofs;
/* Size of comment in bytes. */
mz_uint32m_comment_size;
/* MZ_TRUE if the entry appears to be a directory. */
mz_boolm_is_directory;
/* MZ_TRUE if the entry uses encryption/strong encryption (which miniz_zip doesn't support) */
mz_boolm_is_encrypted;
/* MZ_TRUE if the file is not encrypted, a patch file, and if it uses a compression method we support. */
mz_boolm_is_supported;
/* Filename. If string ends in '/' it's a subdirectory entry. */
/* Guaranteed to be zero terminated, may be truncated to fit. */
charm_filename[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE];
/* Comment field. */
/* Guaranteed to be zero terminated, may be truncated to fit. */
, but I need help figuring out how to get a byte offset from the ZIP file beginning from an instance of this structure (and if it's possible currently).
Or maybe this other mz_zip_reader_extract_iter_state structure could be used for this?
Or is compression level "zero" not supported by miniz decompression routines? I unfortunately can't understand where in code the MZ_NO_COMPRESSION decompression case is treated :(
If it's not possible, adding such a field for "no compression" files would be nice for mmap-based file readers.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi!
Am I right that for zip files with no compression, reading can be done simply via mmap after calculating offset and byte count?
Can
miniz
help in reading from such ZIPs: i.e. parsing the ZIP file tree and providing a requested file offset and byte size?There is the
mz_zip_archive_file_stat
structureminiz/miniz_zip.h
Lines 22 to 77 in 8714fd3
Or maybe this other
mz_zip_reader_extract_iter_state
structure could be used for this?miniz/miniz_zip.h
Lines 186 to 208 in 8714fd3
Or is compression level "zero" not supported by miniz decompression routines? I unfortunately can't understand where in code the
MZ_NO_COMPRESSION
decompression case is treated :(If it's not possible, adding such a field for "no compression" files would be nice for
mmap
-based file readers.Thanks!
The text was updated successfully, but these errors were encountered: