*
* \section intro Introduction
*
- * This is the documentation for the library interface of wimlib 1.3.2. If you
+ * This is the documentation for the library interface of wimlib 1.3.3. If you
* have installed wimlib and want to know how to use the @b wimlib-imagex
* program, please see the man pages instead. Also: the actual project page
* where you can download the source code for the library is at <a
#define WIMLIB_MINOR_VERSION 3
/** Patch version of the library (for example, the 5 in 1.2.5). */
-#define WIMLIB_PATCH_VERSION 2
+#define WIMLIB_PATCH_VERSION 3
/**
* Opaque structure that represents a WIM file. This is an in-memory structure
* ::WIMLIB_COMPRESSION_TYPE_LZX. */
int compression_type;
+ /** Library internal use only. */
uint64_t _private;
} write_streams;
* deleting an image in this way. */
#define WIMLIB_WRITE_FLAG_SOFT_DELETE 0x00000010
+/** Assume that strings are represented in UTF-8, even if this is not the
+ * locale's character encoding. */
+#define WIMLIB_INIT_FLAG_ASSUME_UTF8 0x00000001
+
#if 0
/****************************************************************
WIMLIB_ERR_UNICODE_STRING_NOT_REPRESENTABLE,
WIMLIB_ERR_UNKNOWN_VERSION,
WIMLIB_ERR_UNSUPPORTED,
+ WIMLIB_ERR_VOLUME_LACKS_FEATURES,
WIMLIB_ERR_WRITE,
WIMLIB_ERR_XML,
};
* threads, then you must call this function serially first.
*
* Since wimlib 1.3.0, you must call this function if the character encoding of
- * the current locale is not UTF-8.
+ * the current locale is not UTF-8 and you do not want wimlib to assume a UTF-8
+ * encoding.
*
* Since wimlib 1.3.2, you must call this function if using the Windows-native
* build of the library so that certain functions can be dynamically loaded from
* system DLLs.
*
- * This function currently always returns 0, but it may return other error codes
- * in future releases.
+ * Since wimlib 1.3.3, this function takes the @a init_flags parameter.
+ *
+ * @param init_flags
+ * ::WIMLIB_INIT_FLAG_ASSUME_UTF8 if wimlib should assume that all input
+ * data, including filenames, are in UTF-8, and that UTF-8 data can be
+ * directly printed to the console.
+ *
+ * @return 0; other error codes may be returned in future releases.
*/
extern int
-wimlib_global_init();
+wimlib_global_init(int init_flags);
/**
* Since wimlib 1.2.6: Cleanup function for wimlib. This is not re-entrant.
*
* As a special requirement, the compression code is optimized for the WIM
* format and therefore requires (@a chunk_size <= 32768).
- *
- * As another special requirement, the compression code will read up to 8 bytes
- * off the end of the @a chunk array for performance reasons. The values of
- * these bytes will not affect the output of the compression, but the calling
- * code must make sure that the buffer holding the uncompressed chunk is
- * actually at least (@a chunk_size + 8) bytes, or at least that these extra
- * bytes are in mapped memory that will not cause a memory access violation if
- * accessed.
*/
extern unsigned
wimlib_lzx_compress(const void *chunk, unsigned chunk_size, void *out);