* documented in the man page for @b wimlib-imagex.
*
* - The old WIM format from Vista pre-releases is not supported.
- * - Compressed resource chunk sizes other than 32768 are not supported. This
- * doesn't seem to be a real problem because the chunk size always seems to be
- * this value.
* - wimlib does not provide a clone of the @b PEImg tool, or the @b Dism
* functionality other than that already present in @b ImageX, that allows you
* to make certain Windows-specific modifications to a Windows PE image, such
* increased compression chunk size is limited by the size of each file being
* compressed.
*
- * <b>WARNING: Changing the compression chunk size to any value other than the
- * default of 32768 bytes eliminates compatibility with Microsoft's software,
- * except when increasing the XPRESS chunk size before Windows 8. Chunk sizes
- * other than 32768 are also incompatible with wimlib v1.5.3 and earlier.</b>
+ * <b>WARNING: Microsoft's software is seemingly incompatible with LZX chunk
+ * sizes other than 32768. Chunk sizes other than 32768 (for any format) are
+ * also incompatible with wimlib v1.5.3 and earlier.</b>
*
* @param wim
* ::WIMStruct for a WIM.
* A function equivalent to @c realloc() that wimlib will use to reallocate
* memory. If @c NULL, the free function is set back to the default @c
* realloc() from the C library.
- * @return 0 on success; nonzero on error.
- * @retval ::WIMLIB_ERR_UNSUPPORTED
- * wimlib was compiled with the @c --without-custom-memory-allocator flag,
- * so custom memory allocators are unsupported.
+ * @return 0
*/
extern int
wimlib_set_memory_allocator(void *(*malloc_func)(size_t),
* decompressors currently support sliding windows, and there also exist
* slightly different variants of these formats that are not supported
* unmodified.
- *
+ */
+
+/**
+ * @ingroup G_compression
* @{
*/
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()
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
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().
* @param ctype
* Compression type for which to set the default compression parameters.
* @param params
- * Compression-type specific parameters. This may be @ NULL, in which case
- * the "default default" parameters are restored.
+ * Compression-type specific parameters. This may be @c NULL, in which
+ * case the "default default" parameters are restored.
*
* @return 0 on success; nonzero on error.
*
* @retval ::WIMLIB_ERR_INVALID_COMPRESSION_TYPE
* @p ctype was not a supported compression type.
+ * @retval ::WIMLIB_ERR_NOMEM
+ * Not enough memory to duplicate the parameters (perhaps @c params->size
+ * was invalid).
*/
extern int
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.
*
struct wimlib_compressor **compressor_ret);
/**
- * @ingroup G_compression
- *
* Losslessly compress a block of data using a compressor previously created
* with wimlib_create_compressor().
*
* @param compressed_data
* Buffer into which to write the compressed data.
* @param compressed_size_avail
- * Number of bytes available in @compressed_data.
+ * Number of bytes available in @p compressed_data.
* @param compressor
* A compressor previously allocated with wimlib_create_compressor().
*
* @return
* The size of the compressed data, in bytes, or 0 if the input data could
- * not be compressed to @compressed_size_avail or fewer bytes.
+ * not be compressed to @p compressed_size_avail or fewer bytes.
*/
extern size_t
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
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().
* @param ctype
* Compression type for which to set the default decompression parameters.
* @param params
- * Compression-type specific parameters. This may be @ NULL, in which case
- * the "default default" parameters are restored.
+ * Compression-type specific parameters. This may be @c NULL, in which
+ * case the "default default" parameters are restored.
*
* @return 0 on success; nonzero on error.
*
* @retval ::WIMLIB_ERR_INVALID_COMPRESSION_TYPE
* @p ctype was not a supported compression type.
+ * @retval ::WIMLIB_ERR_NOMEM
+ * Not enough memory to duplicate the parameters (perhaps @c params->size
+ * was invalid).
*/
extern int
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.
*
struct wimlib_decompressor **decompressor_ret);
/**
- * @ingroup G_compression
- *
* Decompress a block of data using a decompressor previously created with
* wimlib_create_decompressor().
*
struct wimlib_decompressor *decompressor);
/**
- * @ingroup G_compression
- *
* Free a decompressor previously allocated with wimlib_create_decompressor().
*
* @param decompressor
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