X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib.h;h=26719cba90cc0bc52b69f82a805a840427b248f7;hp=ffc9cdbf3d9ef31acee107fe6594d387bf93412f;hb=894f8dab7f174bf289e6b5e9ea54374d10d6e62f;hpb=bdea6a2538495fb297e62534f4a6c99b5373fed1 diff --git a/include/wimlib.h b/include/wimlib.h index ffc9cdbf..26719cba 100644 --- a/include/wimlib.h +++ b/include/wimlib.h @@ -12,7 +12,7 @@ /** * @mainpage * - * This is the documentation for the library interface of wimlib 1.7.2, a C + * This is the documentation for the library interface of wimlib 1.7.4, a C * library for creating, modifying, extracting, and mounting files in the * Windows Imaging Format. This documentation is intended for developers only. * If you have installed wimlib and want to know how to use the @b wimlib-imagex @@ -379,7 +379,7 @@ #define WIMLIB_MINOR_VERSION 7 /** Patch version of the library (for example, the 5 in 1.2.5). */ -#define WIMLIB_PATCH_VERSION 2 +#define WIMLIB_PATCH_VERSION 4 #ifdef __cplusplus extern "C" { @@ -474,7 +474,7 @@ enum wimlib_compression_type { * * If using wimlib_create_compressor() to create an XPRESS compressor * directly, the @p max_block_size parameter may be any positive value - * up to 2^16. + * up to and including 2^16. */ WIMLIB_COMPRESSION_TYPE_XPRESS = 1, @@ -496,7 +496,7 @@ enum wimlib_compression_type { * * If using wimlib_create_compressor() to create an LZX compressor * directly, the @p max_block_size parameter may be any positive value - * up to 2^21. + * up to and including 2^21. */ WIMLIB_COMPRESSION_TYPE_LZX = 2, @@ -517,7 +517,7 @@ enum wimlib_compression_type { * * If using wimlib_create_compressor() to create an LZMS compressor * directly, the @p max_block_size parameter may be any positive value - * up to 2^31 - 2. + * up to and including 1180427429. */ WIMLIB_COMPRESSION_TYPE_LZMS = 3, }; @@ -725,6 +725,9 @@ enum wimlib_progress_msg { * Currently, only the following types of errors will result in this * progress message being sent: * + * - Directory tree scan errors, e.g. from wimlib_add_image() + * - Most extraction errors; currently restricted to the Windows + * build of the library only. */ WIMLIB_PROGRESS_MSG_HANDLE_ERROR = 31, }; @@ -1389,7 +1392,7 @@ struct wimlib_wim_info { }; /** Information about a unique stream in the WIM file. (A stream is the same - * thing as a "resource", except in the case of packed resources.) */ + * thing as a "resource", except in the case of solid resources.) */ struct wimlib_resource_entry { /** Uncompressed size of the stream in bytes. */ uint64_t uncompressed_size; @@ -1401,7 +1404,7 @@ struct wimlib_resource_entry { /** Offset, in bytes, of this stream from the start of the WIM file. Or * if @p packed is 1, then this is actually the offset at which this - * stream begins in the uncompressed contents of the packed resource. + * stream begins in the uncompressed contents of the solid resource. */ uint64_t offset; @@ -1430,18 +1433,18 @@ struct wimlib_resource_entry { * */ uint32_t is_missing : 1; - /** 1 if this stream is located in a packed resource which may contain + /** 1 if this stream is located in a solid resource which may contain * other streams (all compressed together) as well. */ uint32_t packed : 1; uint32_t reserved_flags : 26; - /** If @p packed is 1, then this will specify the offset of the packed + /** If @p packed is 1, then this will specify the offset of the solid * resource in the WIM. */ uint64_t raw_resource_offset_in_wim; /** If @p packed is 1, then this will specify the compressed size of the - * packed resource in the WIM. */ + * solid resource in the WIM. */ uint64_t raw_resource_compressed_size; uint64_t reserved[2]; @@ -1763,6 +1766,8 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour */ #define WIMLIB_ADD_FLAG_TEST_FILE_EXCLUSION 0x00004000 +/* Note: the WIMLIB_ADD_IMAGE_FLAG names are retained for source compatibility. + * Use the WIMLIB_ADD_FLAG names in new code. */ #define WIMLIB_ADD_IMAGE_FLAG_NTFS WIMLIB_ADD_FLAG_NTFS #define WIMLIB_ADD_IMAGE_FLAG_DEREFERENCE WIMLIB_ADD_FLAG_DEREFERENCE #define WIMLIB_ADD_IMAGE_FLAG_VERBOSE WIMLIB_ADD_FLAG_VERBOSE @@ -2114,10 +2119,10 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour * wimlib_set_default_compression_level() can be called beforehand to set an * even higher compression level than the default. * - * If the WIM contains solid blocks, then ::WIMLIB_WRITE_FLAG_RECOMPRESS can be - * used in combination with ::WIMLIB_WRITE_FLAG_PACK_STREAMS to prevent any - * solid blocks from being re-used. Otherwise, solid blocks are re-used - * somewhat more liberally than normal compressed blocks. + * If the WIM contains solid resources, then ::WIMLIB_WRITE_FLAG_RECOMPRESS can + * be used in combination with ::WIMLIB_WRITE_FLAG_SOLID to prevent any solid + * resources from being re-used. Otherwise, solid resources are re-used + * somewhat more liberally than normal compressed resources. * * ::WIMLIB_WRITE_FLAG_RECOMPRESS does not cause recompression of streams * that would not otherwise be written. For example, a call to @@ -2211,8 +2216,8 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour #define WIMLIB_WRITE_FLAG_RETAIN_GUID 0x00000800 /** - * When writing streams in the resulting WIM file, pack multiple streams into a - * single compressed resource instead of compressing them independently. This + * When writing streams in the resulting WIM file, combine multiple streams into + * a single compressed resource instead of compressing them independently. This * is also known as creating a "solid archive". This tends to produce a better * compression ratio at the cost of much slower random access. * @@ -2226,23 +2231,29 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour * ::WIMLIB_WRITE_FLAG_RECOMPRESS to force the entire WIM file be rebuilt with * all streams recompressed in solid mode. * - * Currently, new solid blocks will, by default, be written using LZMS + * Currently, new solid resources will, by default, be written using LZMS * compression with 32 MiB (33554432 byte) chunks. Use * wimlib_set_output_pack_compression_type() and/or * wimlib_set_output_pack_chunk_size() to change this. This is independent of * the WIM's main compression type and chunk size; you can have a WIM that * nominally uses LZX compression and 32768 byte chunks but actually contains - * LZMS-compressed solid blocks, for example. However, if including solid + * LZMS-compressed solid resources, for example. However, if including solid * blocks, I suggest that you set the WIM's main compression type to LZMS as * well, either by creating the WIM with * ::wimlib_create_new_wim(::WIMLIB_COMPRESSION_TYPE_LZMS, ...) or by calling * ::wimlib_set_output_compression_type(..., ::WIMLIB_COMPRESSION_TYPE_LZMS). * * This flag will be set by default when writing or overwriting a WIM file that - * either already contains packed streams, or has had packed streams exported + * either already contains solid resources, or has had solid resources exported * into it and the WIM's main compression type is LZMS. */ -#define WIMLIB_WRITE_FLAG_PACK_STREAMS 0x00001000 +#define WIMLIB_WRITE_FLAG_SOLID 0x00001000 + +/** + * Deprecated: this is the old name for ::WIMLIB_WRITE_FLAG_SOLID, retained for + * source compatibility. + */ +#define WIMLIB_WRITE_FLAG_PACK_STREAMS WIMLIB_WRITE_FLAG_SOLID /** * Send ::WIMLIB_PROGRESS_MSG_DONE_WITH_FILE messages while writing the WIM @@ -3178,7 +3189,7 @@ wimlib_get_image_name(const WIMStruct *wim, int image); * bits contain the patch version. * * In other words, the returned value is equal to ((WIMLIB_MAJOR_VERSION - * << 22) | (WIMLIB_MINOR_VERSION << 10) | WIMLIB_PATCH_VERSION) for the + * << 20) | (WIMLIB_MINOR_VERSION << 10) | WIMLIB_PATCH_VERSION) for the * corresponding header file. */ extern uint32_t @@ -4026,7 +4037,7 @@ wimlib_set_output_chunk_size(WIMStruct *wim, uint32_t chunk_size); * @ingroup G_writing_and_overwriting_wims * * Similar to wimlib_set_output_chunk_size(), but set the chunk size for writing - * packed streams (solid blocks). + * solid resources. */ extern int wimlib_set_output_pack_chunk_size(WIMStruct *wim, uint32_t chunk_size); @@ -4057,7 +4068,7 @@ wimlib_set_output_compression_type(WIMStruct *wim, int ctype); * @ingroup G_writing_and_overwriting_wims * * Similar to wimlib_set_output_compression_type(), but set the compression type - * for writing packed streams (solid blocks). + * for writing solid resources. */ extern int wimlib_set_output_pack_compression_type(WIMStruct *wim, int ctype);