]> wimlib.net Git - wimlib/blobdiff - include/wimlib.h
Remove WIMLIB_WRITE_FLAG_NO_PACK_STREAMS
[wimlib] / include / wimlib.h
index 2245a37271e3ab63a3c79720a933a2314b75d5ad..93f7f359416c5672f7aa5c562367c872446c929e 100644 (file)
@@ -417,8 +417,7 @@ enum wimlib_compression_type {
        /** Compressed resources in the WIM use XPRESS compression. */
        WIMLIB_COMPRESSION_TYPE_XPRESS = 2,
 
-       /** Compressed resources in the WIM use LZMS compression.  Currently,
-        * wimlib has a decompressor for this format but not a compressor.  LZMS
+       /** Compressed resources in the WIM use LZMS compression.  Note: LZMS
         * compression is only compatible with wimlib v1.6.0 and later and with
         * WIMGAPI Windows 8 and later (and some restrictions apply on the
         * latter).  */
@@ -1544,29 +1543,21 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour
 
 #define WIMLIB_WRITE_FLAG_RESERVED                     0x00000800
 
-/** When writing streams in the resulting WIM file, pack multiple streams into a
+/**
+ * When writing streams in the resulting WIM file, pack multiple streams into a
  * single WIM resource instead of compressing them independently.  This tends to
  * produce a better compression ratio at the cost of less random access.
- * Furthermore, WIMs created with this flag are only compatible with wimlib
- * v1.6.0 or later and WIMGAPI Windows 8 or later, seemingly for Windows Setup
- * only and <b>not including ImageX and Dism</b>.  WIMs created with this flag
- * use version number 3584 in their header instead of 68864.  If this flag is
- * passed to wimlib_overwrite() and the WIM did not previously contain packed
- * streams, the WIM's version number will be changed to 3584 and the new streams
- * will be written packed.  */
+ * However, WIMs created with this flag are only compatible with wimlib v1.6.0
+ * or later and WIMGAPI Windows 8 or later, seemingly for Windows Setup only and
+ * <b>not including ImageX and Dism</b>.  WIMs created with this flag must use
+ * version number 3584 in their header instead of 68864.
+ *
+ * If this flag is passed to wimlib_overwrite() and the WIM did not previously
+ * contain packed streams, the WIM's version number will be changed to 3584 and
+ * the new streams will be written packed.  Use ::WIMLIB_WRITE_FLAG_REBUILD to
+ * force the WIM to be fully rebuilt.  */
 #define WIMLIB_WRITE_FLAG_PACK_STREAMS                 0x00001000
 
-/** Compress all streams independently.  This produces a WIM optimized for
- * random access and compatibility, as noted in the documentation for
- * ::WIMLIB_WRITE_RESOURCE_FLAG_PACK_STREAMS.  For wimlib_write(), this is the
- * default behavior. For wimlib_overwrite(), this is the default if the WIM file
- * did not already contain packed streams.  Also, for wimlib_overwrite(), if the
- * WIM already contained packed streams, specifying this flag but not
- * ::WIMLIB_WRITE_FLAG_REBUILD will cause new streams to be written unpacked,
- * but the WIM itself will not be rebuilt and may still contain packed streams.
- */
-#define WIMLIB_WRITE_FLAG_NO_PACK_STREAMS              0x00002000
-
 /** @} */
 /** @ingroup G_general
  * @{ */
@@ -3216,7 +3207,9 @@ wimlib_set_image_descripton(WIMStruct *wim, int image,
  *     on the compression format.  The XPRESS compression format supports chunk
  *     sizes that are powers of 2 with exponents between 15 and 26 inclusively,
  *     whereas the LZX compression format supports chunk sizes that are powers
- *     of 2 with exponents between 15 and 21 inclusively.
+ *     of 2 with exponents between 15 and 21 inclusively.  As a special case,
+ *     if @p out_chunk_size is specified as 0, the chunk size is set to the
+ *     default for the currently selected output compression type.
  *
  * @return 0 on success; nonzero on error.
  *
@@ -3226,6 +3219,15 @@ wimlib_set_image_descripton(WIMStruct *wim, int image,
 extern int
 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.
+ */
+extern int
+wimlib_set_output_pack_chunk_size(WIMStruct *wim, uint32_t chunk_size);
+
 /**
  * @ingroup G_writing_and_overwriting_wims
  *
@@ -3242,12 +3244,21 @@ wimlib_set_output_chunk_size(WIMStruct *wim, uint32_t chunk_size);
  *
  * @return 0 on success; nonzero on error.
  *
- * @retval ::WIMLIB_ERR_INVALID_PARAM
+ * @retval ::WIMLIB_ERR_INVALID_COMPRESSION_TYPE
  *     @p ctype did not specify a valid compression type.
  */
 extern int
 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.
+ */
+extern int
+wimlib_set_output_pack_compression_type(WIMStruct *wim, int ctype);
+
 /**
  * @ingroup G_modifying_wims
  *
@@ -3760,8 +3771,6 @@ wimlib_write_to_fd(WIMStruct *wim,
 struct wimlib_compressor_params_header {
        /** Size of the parameters, in bytes.  */
        uint32_t size;
-
-       uint32_t reserved;
 };
 
 /** Header for decompression parameters to pass to wimlib_create_decompressor()
@@ -3769,8 +3778,6 @@ struct wimlib_compressor_params_header {
 struct wimlib_decompressor_params_header {
        /** Size of the parameters, in bytes.  */
        uint32_t size;
-
-       uint32_t reserved;
 };
 
 /** LZX compression parameters that can optionally be passed to
@@ -3866,11 +3873,7 @@ struct wimlib_compressor;
 /** Opaque decompressor handle.  */
 struct wimlib_decompressor;
 
-/** @} */
-
 /**
- * @ingroup G_compression
- *
  * Set the default compression parameters for the specified compression type.
  * This will affect both explicit and wimlib-internal calls to
  * wimlib_create_compressor().
@@ -3894,8 +3897,6 @@ wimlib_set_default_compressor_params(enum wimlib_compression_type ctype,
                                     const struct wimlib_compressor_params_header *params);
 
 /**
- * @ingroup G_compression
- *
  * Allocate a compressor for the specified compression type using the specified
  * parameters.
  *
@@ -3931,8 +3932,6 @@ wimlib_create_compressor(enum wimlib_compression_type ctype,
                         struct wimlib_compressor **compressor_ret);
 
 /**
- * @ingroup G_compression
- *
  * Losslessly compress a block of data using a compressor previously created
  * with wimlib_create_compressor().
  *
@@ -3957,8 +3956,6 @@ wimlib_compress(const void *uncompressed_data, size_t uncompressed_size,
                struct wimlib_compressor *compressor);
 
 /**
- * @ingroup G_compression
- *
  * Free a compressor previously allocated with wimlib_create_compressor().
  *
  * @param compressor
@@ -3968,8 +3965,6 @@ extern void
 wimlib_free_compressor(struct wimlib_compressor *compressor);
 
 /**
- * @ingroup G_compression
- *
  * Set the default decompression parameters for the specified compression type.
  * This will affect both explicit and wimlib-internal calls to
  * wimlib_create_decompressor().
@@ -3993,8 +3988,6 @@ wimlib_set_default_decompressor_params(enum wimlib_compression_type ctype,
                                       const struct wimlib_decompressor_params_header *params);
 
 /**
- * @ingroup G_compression
- *
  * Allocate a decompressor for the specified compression type using the
  * specified parameters.
  *
@@ -4029,8 +4022,6 @@ wimlib_create_decompressor(enum wimlib_compression_type ctype,
                           struct wimlib_decompressor **decompressor_ret);
 
 /**
- * @ingroup G_compression
- *
  * Decompress a block of data using a decompressor previously created with
  * wimlib_create_decompressor().
  *
@@ -4053,8 +4044,6 @@ wimlib_decompress(const void *compressed_data, size_t compressed_size,
                  struct wimlib_decompressor *decompressor);
 
 /**
- * @ingroup G_compression
- *
  * Free a decompressor previously allocated with wimlib_create_decompressor().
  *
  * @param decompressor
@@ -4064,6 +4053,57 @@ extern void
 wimlib_free_decompressor(struct wimlib_decompressor *decompressor);
 
 
+struct wimlib_lzx_params_old;
+struct wimlib_lzx_context_old;
+
+/** Deprecated; do not use.  */
+extern int
+wimlib_lzx_set_default_params(const struct wimlib_lzx_params_old *params)
+               _wimlib_deprecated;
+
+/** Deprecated; do not use.  */
+extern int
+wimlib_lzx_alloc_context(const struct wimlib_lzx_params_old *params,
+                        struct wimlib_lzx_context_old **ctx_pp)
+               _wimlib_deprecated;
+
+/** Deprecated; do not use.  */
+extern void
+wimlib_lzx_free_context(struct wimlib_lzx_context_old *ctx)
+               _wimlib_deprecated;
+
+/** Deprecated; do not use.  */
+extern unsigned
+wimlib_lzx_compress2(const void *udata, unsigned ulen, void *cdata,
+                    struct wimlib_lzx_context_old *ctx)
+               _wimlib_deprecated;
+
+/** Deprecated; do not use.  */
+extern unsigned
+wimlib_lzx_compress(const void *udata, unsigned ulen, void *cdata)
+               _wimlib_deprecated;
+
+/** Deprecated; do not use.  */
+extern unsigned
+wimlib_xpress_compress(const void *udata, unsigned ulen, void *cdata)
+               _wimlib_deprecated;
+
+/** Deprecated; do not use.  */
+extern int
+wimlib_lzx_decompress(const void *cdata, unsigned clen,
+                     void *udata, unsigned ulen)
+               _wimlib_deprecated;
+
+/** Deprecated; do not use.  */
+extern int
+wimlib_xpress_decompress(const void *cdata, unsigned clen,
+                        void *udata, unsigned ulen)
+               _wimlib_deprecated;
+
+/** @} */
+
+
+
 #ifdef __cplusplus
 }
 #endif