+wimlib_set_default_compressor_params(enum wimlib_compression_type ctype,
+ const struct wimlib_compressor_params_header *params);
+
+/**
+ * Allocate a compressor for the specified compression type using the specified
+ * parameters.
+ *
+ * @param ctype
+ * Compression type for which to create the compressor.
+ * @param max_block_size
+ * Maximum block size to support. The exact meaning and allowed values for
+ * this parameter depend on the compression type, but it at least specifies
+ * the maximum allowed value for @p uncompressed_size to wimlib_compress().
+ * @param extra_params
+ * An optional pointer to extra compressor parameters for the specified
+ * compression type. For LZX, a pointer to ::wimlib_lzx_compressor_params
+ * may be specified here. If left @c NULL, the default parameters are
+ * used.
+ * @param compressor_ret
+ * A location into which to return the pointer to the allocated compressor,
+ * which can be used for any number of calls to wimlib_compress() before
+ * being freed with wimlib_free_compressor().
+ *
+ * @return 0 on success; nonzero on error.
+ *
+ * @retval ::WIMLIB_ERR_INVALID_COMPRESSION_TYPE
+ * @p ctype was not a supported compression type.
+ * @retval ::WIMLIB_ERR_INVALID_PARAM
+ * The compression parameters were invalid.
+ * @retval ::WIMLIB_ERR_NOMEM
+ * Insufficient memory to allocate the compressor.
+ */
+extern int
+wimlib_create_compressor(enum wimlib_compression_type ctype,
+ size_t max_block_size,
+ const struct wimlib_compressor_params_header *extra_params,
+ struct wimlib_compressor **compressor_ret);
+
+/**
+ * Losslessly compress a block of data using a compressor previously created
+ * with wimlib_create_compressor().
+ *
+ * @param uncompressed_data
+ * Buffer containing the data to compress.
+ * @param uncompressed_size
+ * Size, in bytes, of the data to compress.
+ * @param compressed_data
+ * Buffer into which to write the compressed data.
+ * @param compressed_size_avail
+ * 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 @p compressed_size_avail or fewer bytes.
+ */
+extern size_t
+wimlib_compress(const void *uncompressed_data, size_t uncompressed_size,
+ void *compressed_data, size_t compressed_size_avail,
+ struct wimlib_compressor *compressor);
+
+/**
+ * Free a compressor previously allocated with wimlib_create_compressor().
+ *
+ * @param compressor
+ * The compressor to free.
+ */
+extern void
+wimlib_free_compressor(struct wimlib_compressor *compressor);
+
+/**
+ * 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 @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);
+
+/**
+ * Allocate a decompressor for the specified compression type using the
+ * specified parameters.
+ *
+ * @param ctype
+ * Compression type for which to create the decompressor.
+ * @param max_block_size
+ * Maximum block size to support. The exact meaning and allowed values for
+ * this parameter depend on the compression type, but it at least specifies
+ * the maximum allowed value for @p uncompressed_size to
+ * wimlib_decompress().
+ * @param extra_params
+ * An optional pointer to extra decompressor parameters for the specified
+ * compression type. If @c NULL, the default parameters are used.
+ * @param decompressor_ret
+ * A location into which to return the pointer to the allocated
+ * decompressor, which can be used for any number of calls to
+ * wimlib_decompress() before being freed with wimlib_free_decompressor().
+ *
+ * @return 0 on success; nonzero on error.
+ *
+ * @retval ::WIMLIB_ERR_INVALID_COMPRESSION_TYPE
+ * @p ctype was not a supported compression type.
+ * @retval ::WIMLIB_ERR_INVALID_PARAM
+ * The decompression parameters were invalid.
+ * @retval ::WIMLIB_ERR_NOMEM
+ * Insufficient memory to allocate the decompressor.
+ */
+extern int
+wimlib_create_decompressor(enum wimlib_compression_type ctype,
+ size_t max_block_size,
+ const struct wimlib_decompressor_params_header *extra_params,
+ struct wimlib_decompressor **decompressor_ret);
+
+/**
+ * Decompress a block of data using a decompressor previously created with
+ * wimlib_create_decompressor().
+ *
+ * @param compressed_data
+ * Buffer containing the data to decompress.
+ * @param compressed_size
+ * Size, in bytes, of the data to decompress.
+ * @param uncompressed_data
+ * Buffer into which to write the uncompressed data.
+ * @param uncompressed_size
+ * Size, in bytes, of the data when uncompressed.
+ * @param decompressor
+ * A decompressor previously allocated with wimlib_create_decompressor().
+ *
+ * @return 0 on success; nonzero on error.
+ */
+extern int
+wimlib_decompress(const void *compressed_data, size_t compressed_size,
+ void *uncompressed_data, size_t uncompressed_size,
+ struct wimlib_decompressor *decompressor);
+
+/**
+ * Free a decompressor previously allocated with wimlib_create_decompressor().
+ *
+ * @param decompressor
+ * The decompressor to free.
+ */
+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