]> wimlib.net Git - wimlib/blobdiff - include/wimlib.h
Use v1.8.0 as next version instead of v1.7.5
[wimlib] / include / wimlib.h
index a7b18489ef178c67f426e0d6e84251598627d063..70b1781facef4367a17b4390eba73830314f6ac9 100644 (file)
@@ -511,13 +511,15 @@ enum wimlib_compression_type {
         * later.  Also, chunk sizes larger than <c>2^26</c> are not compatible
         * with the Microsoft implementation.
         *
-        * wimlib's LZMS compressor is currently faster but will usually not
-        * compress as much as the implementation in Microsoft's WIMGAPI
-        * (Windows 8.1).
+        * wimlib's LZMS compressor will, with the default settings, usually
+        * produce a better compression ratio, and work more quickly, than the
+        * implementation in Microsoft's WIMGAPI (as of Windows 8.1).  There is
+        * limited support for non-default compression levels, but compression
+        * will be noticably faster if you choose a level < 35.
         *
         * If using wimlib_create_compressor() to create an LZMS compressor
         * directly, the @p max_block_size parameter may be any positive value
-        * up to and including <c>1180427429</c>.
+        * up to and including <c>2^30</c>.
         */
        WIMLIB_COMPRESSION_TYPE_LZMS = 3,
 };
@@ -2232,7 +2234,7 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour
  * all streams recompressed in solid mode.
  *
  * Currently, new solid resources will, by default, be written using LZMS
- * compression with 32 MiB (33554432 byte) chunks.  Use
+ * compression with 64 MiB (67108864 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
@@ -4624,6 +4626,8 @@ wimlib_get_compressor_needed_memory(enum wimlib_compression_type ctype,
                                    size_t max_block_size,
                                    unsigned int compression_level);
 
+#define WIMLIB_COMPRESSOR_FLAG_DESTRUCTIVE     0x80000000
+
 /**
  * Allocate a compressor for the specified compression type using the specified
  * parameters.  This function is part of wimlib's compression API; it is not
@@ -4668,6 +4672,15 @@ wimlib_get_compressor_needed_memory(enum wimlib_compression_type ctype,
  *     The compression level does not affect the format of the compressed data.
  *     Therefore, it is a compressor-only parameter and does not need to be
  *     passed to the decompressor.
+ *     <br/>
+ *     Since wimlib v1.8.0, this parameter can be OR-ed with the flag
+ *     ::WIMLIB_COMPRESSOR_FLAG_DESTRUCTIVE.  This creates the compressor in a
+ *     mode where it is allowed to modify the input buffer.  Specifically, in
+ *     this mode, if compression succeeds, the input buffer may have been
+ *     modified, whereas if compression does not succeed the input buffer still
+ *     may have been written to but will have been restored exactly to its
+ *     original state.  This mode is designed to save some memory when using
+ *     large buffer sizes.
  * @param compressor_ret
  *     A location into which to return the pointer to the allocated compressor.
  *     The allocated compressor can be used for any number of calls to