]> wimlib.net Git - wimlib/blobdiff - include/wimlib/resource.h
Handle streams with uncompressed size 4 GiB consistently
[wimlib] / include / wimlib / resource.h
index 3b863f4654d66d1146c6070e42cd79810ddc1c1b..488ea6a99f2c2a8ddeec357ef69d8e7091ecf541 100644 (file)
@@ -170,6 +170,15 @@ struct alt_chunk_table_header_disk {
         * the chunks (4 bytes per entry).  */
 } _packed_attribute;
 
+static inline unsigned int
+get_chunk_entry_size(u64 res_size, bool is_alt)
+{
+       if (res_size <= UINT32_MAX || is_alt)
+               return 4;
+       else
+               return 8;
+}
+
 /* Functions to read streams  */
 
 extern int