- zip_magic z_magic;
- zip_version z_encoder; /* version made by */
- zip_version z_extract; /* version need to extract */
- unsigned short z_flags; /* general purpose bit flag */
- unsigned short z_compr; /* compression method */
- zip_dostime z_dostime; /* last mod file time&date (dos format) */
- unsigned int z_crc32; /* crc-32 */
- unsigned int z_csize; /* compressed size */
- unsigned int z_usize; /* uncompressed size */
- unsigned short z_namlen; /* filename length (null if stdin) */
- unsigned short z_extras; /* extra field length */
- unsigned short z_comment; /* file comment length */
- unsigned short z_diskstart; /* disk number of start (if spanning zip over multiple disks) */
- unsigned short z_filetype; /* internal file attributes, bit0 = ascii */
- unsigned int z_filemode; /* extrnal file attributes, eg. msdos attrib byte */
- unsigned int z_off; /* relative offset of local file header, seekval if singledisk */
- /* followed by filename (of variable size) */
- /* followed by extra field (of variable size) */
- /* followed by file comment (of variable size) */
-};
-
-inline void istream_read_zip_root_dirent(SeekableInputStream& istream, zip_root_dirent& root_dirent)
-{
- istream_read_zip_magic(istream, root_dirent.z_magic);
- istream_read_zip_version(istream, root_dirent.z_encoder);
- istream_read_zip_version(istream, root_dirent.z_extract);
- root_dirent.z_flags = istream_read_uint16_le(istream);
- root_dirent.z_compr = istream_read_uint16_le(istream);
- istream_read_zip_dostime(istream, root_dirent.z_dostime);
- root_dirent.z_crc32 = istream_read_uint32_le(istream);
- root_dirent.z_csize = istream_read_uint32_le(istream);
- root_dirent.z_usize = istream_read_uint32_le(istream);
- root_dirent.z_namlen = istream_read_uint16_le(istream);
- root_dirent.z_extras = istream_read_uint16_le(istream);
- root_dirent.z_comment = istream_read_uint16_le(istream);
- root_dirent.z_diskstart = istream_read_uint16_le(istream);
- root_dirent.z_filetype = istream_read_uint16_le(istream);
- root_dirent.z_filemode = istream_read_uint32_le(istream);
- root_dirent.z_off = istream_read_uint32_le(istream);
- istream.seek(root_dirent.z_namlen + root_dirent.z_extras + root_dirent.z_comment, SeekableInputStream::cur);
+ zip_magic z_magic;
+ zip_version z_encoder; /* version made by */
+ zip_version z_extract; /* version need to extract */
+ unsigned short z_flags; /* general purpose bit flag */
+ unsigned short z_compr; /* compression method */
+ zip_dostime z_dostime; /* last mod file time&date (dos format) */
+ unsigned int z_crc32; /* crc-32 */
+ unsigned int z_csize; /* compressed size */
+ unsigned int z_usize; /* uncompressed size */
+ unsigned short z_namlen; /* filename length (null if stdin) */
+ unsigned short z_extras; /* extra field length */
+ unsigned short z_comment; /* file comment length */
+ unsigned short z_diskstart; /* disk number of start (if spanning zip over multiple disks) */
+ unsigned short z_filetype; /* internal file attributes, bit0 = ascii */
+ unsigned int z_filemode; /* extrnal file attributes, eg. msdos attrib byte */
+ unsigned int z_off; /* relative offset of local file header, seekval if singledisk */
+ /* followed by filename (of variable size) */
+ /* followed by extra field (of variable size) */
+ /* followed by file comment (of variable size) */
+};
+
+inline void istream_read_zip_root_dirent( SeekableInputStream& istream, zip_root_dirent& root_dirent ){
+ istream_read_zip_magic( istream, root_dirent.z_magic );
+ istream_read_zip_version( istream, root_dirent.z_encoder );
+ istream_read_zip_version( istream, root_dirent.z_extract );
+ root_dirent.z_flags = istream_read_uint16_le( istream );
+ root_dirent.z_compr = istream_read_uint16_le( istream );
+ istream_read_zip_dostime( istream, root_dirent.z_dostime );
+ root_dirent.z_crc32 = istream_read_uint32_le( istream );
+ root_dirent.z_csize = istream_read_uint32_le( istream );
+ root_dirent.z_usize = istream_read_uint32_le( istream );
+ root_dirent.z_namlen = istream_read_uint16_le( istream );
+ root_dirent.z_extras = istream_read_uint16_le( istream );
+ root_dirent.z_comment = istream_read_uint16_le( istream );
+ root_dirent.z_diskstart = istream_read_uint16_le( istream );
+ root_dirent.z_filetype = istream_read_uint16_le( istream );
+ root_dirent.z_filemode = istream_read_uint32_le( istream );
+ root_dirent.z_off = istream_read_uint32_le( istream );
+ istream.seek( root_dirent.z_namlen + root_dirent.z_extras + root_dirent.z_comment, SeekableInputStream::cur );