Add support for unsafe in-place compaction of WIM files
[wimlib] / include / wimlib / write.h
index 273a6a7..3f7a7e5 100644 (file)
@@ -5,14 +5,11 @@
 #include "wimlib/types.h"
 
 /* Internal use only */
-#define WIMLIB_WRITE_FLAG_NO_LOOKUP_TABLE              0x80000000
-#define WIMLIB_WRITE_FLAG_CHECKPOINT_AFTER_XML         0x40000000
-#define WIMLIB_WRITE_FLAG_REUSE_INTEGRITY_TABLE                0x20000000
-#define WIMLIB_WRITE_FLAG_HEADER_AT_END                        0x10000000
-#define WIMLIB_WRITE_FLAG_FILE_DESCRIPTOR              0x08000000
-#define WIMLIB_WRITE_FLAG_USE_EXISTING_TOTALBYTES      0x04000000
-#define WIMLIB_WRITE_FLAG_NO_METADATA                  0x02000000
-#define WIMLIB_WRITE_FLAG_OVERWRITE                    0x01000000
+#define WIMLIB_WRITE_FLAG_FILE_DESCRIPTOR              0x80000000
+#define WIMLIB_WRITE_FLAG_APPEND                       0x40000000
+#define WIMLIB_WRITE_FLAG_NO_NEW_BLOBS                 0x20000000
+#define WIMLIB_WRITE_FLAG_USE_EXISTING_TOTALBYTES      0x10000000
+#define WIMLIB_WRITE_FLAG_NO_METADATA                  0x08000000
 
 /* Keep in sync with wimlib.h  */
 #define WIMLIB_WRITE_MASK_PUBLIC (                       \
        WIMLIB_WRITE_FLAG_SKIP_EXTERNAL_WIMS            | \
        WIMLIB_WRITE_FLAG_STREAMS_OK                    | \
        WIMLIB_WRITE_FLAG_RETAIN_GUID                   | \
-       WIMLIB_WRITE_FLAG_PACK_STREAMS)
+       WIMLIB_WRITE_FLAG_SOLID                         | \
+       WIMLIB_WRITE_FLAG_SEND_DONE_WITH_FILE_MESSAGES  | \
+       WIMLIB_WRITE_FLAG_NO_SOLID_SORT                 | \
+       WIMLIB_WRITE_FLAG_UNSAFE_COMPACT)
 
 #if defined(HAVE_SYS_FILE_H) && defined(HAVE_FLOCK)
 extern int
@@ -47,7 +47,9 @@ unlock_wim_for_append(WIMStruct *wim)
 }
 #endif
 
+struct filedes;
 struct list_head;
+struct wim_reshdr;
 
 int
 write_wim_part(WIMStruct *wim,
@@ -57,16 +59,18 @@ write_wim_part(WIMStruct *wim,
               unsigned num_threads,
               unsigned part_number,
               unsigned total_parts,
-              struct list_head *stream_list_override,
+              struct list_head *blob_list_override,
               const u8 *guid);
 
 int
-write_wim_resource_from_buffer(const void *buf, size_t buf_size,
-                              int reshdr_flags, struct filedes *out_fd,
+write_wim_resource_from_buffer(const void *buf,
+                              size_t buf_size,
+                              bool is_metadata,
+                              struct filedes *out_fd,
                               int out_ctype,
                               u32 out_chunk_size,
                               struct wim_reshdr *out_reshdr,
-                              u8 *hash,
+                              u8 *hash_ret,
                               int write_resource_flags);
 
 #endif /* _WIMLIB_WRITE_H */