- * @retval ::WIMLIB_ERR_INVALID_PARAM
- * The window size or compression parameters were invalid.
- * @retval ::WIMLIB_ERR_NOMEM
- * Not enough memory to allocate the compression context.
- */
-extern int
-wimlib_lzx_alloc_context(uint32_t window_size,
- const struct wimlib_lzx_params *params,
- struct wimlib_lzx_context **ctx_pp);
-
-/**
- * @ingroup G_compression
- *
- * Decompresses a block of LZX-compressed data as used in the WIM file format.
- *
- * Note that this will NOT work unmodified for LZX as used in the cabinet
- * format, which is not the same as in the WIM format!
- *
- * This function is exported for convenience only and should only be used by
- * library clients looking to make use of wimlib's compression code for another
- * purpose.
- *
- * @param compressed_data
- * Pointer to the compressed data.
- *
- * @param compressed_len
- * Length of the compressed data, in bytes.
- *
- * @param uncompressed_data
- * Pointer to the buffer into which to write the uncompressed data.
- *
- * @param uncompressed_len
- * Length of the uncompressed data. It must be 32768 bytes or less.
- *
- * @return
- * 0 on success; non-zero on failure.
- */
-extern int
-wimlib_lzx_decompress(const void *compressed_data, unsigned compressed_len,
- void *uncompressed_data, unsigned uncompressed_len);
-
-/**
- * @ingroup G_compression
- *
- * Equivalent to wimlib_lzx_decompress(), except the window size is specified in
- * @p max_window_size as any power of 2 between 2^15 and 2^21, inclusively, and
- * @p uncompressed_len may be any size less than or equal to @p max_window_size.
- */
-extern int
-wimlib_lzx_decompress2(const void *compressed_data, unsigned compressed_len,
- void *uncompressed_data, unsigned uncompressed_len,
- uint32_t max_window_size);
-
-/**
- * @ingroup G_compression
- *
- * Free the specified LZX compression context, allocated with
- * wimlib_lzx_alloc_context().
- */
-extern void
-wimlib_lzx_free_context(struct wimlib_lzx_context *ctx);
-
-/**
- * @ingroup G_compression
- *
- * Set the global default LZX compression parameters.
- *
- * @param params
- * The LZX compression parameters to set. These default parameters will be
- * used by any calls to wimlib_lzx_alloc_context() with @c NULL LZX
- * parameters specified, as well as by any future compression performed by
- * the library itself. Passing @p NULL here resets the default LZX
- * parameters to their original value.
- *
- * @return 0 on success; nonzero on error.
- *
- * @retval ::WIMLIB_ERR_INVALID_PARAM
- * The compression parameters were invalid.
- */
-extern int
-wimlib_lzx_set_default_params(const struct wimlib_lzx_params *params);
-
-/**
- * @ingroup G_compression
- *
- * Free the specified LZX compression context, allocated with
- * wimlib_lzx_alloc_context().
- */
-extern void
-wimlib_lzx_free_context(struct wimlib_lzx_context *ctx);
-
-
-/**
- * @ingroup G_mounting_wim_images
- *
- * Mounts an image in a WIM file on a directory read-only or read-write.
- *
- * As this is implemented using FUSE (Filesystme in UserSpacE), this is not
- * supported if wimlib was configured with @c --without-fuse. This includes
- * Windows builds of wimlib; ::WIMLIB_ERR_UNSUPPORTED will be returned in such
- * cases.
- *
- * Calling this function daemonizes the process, unless
- * ::WIMLIB_MOUNT_FLAG_DEBUG was specified or an early occur occurs. If the
- * mount is read-write (::WIMLIB_MOUNT_FLAG_READWRITE specified), modifications
- * to the WIM are staged in a temporary directory.
- *
- * It is safe to mount multiple images from the same underlying WIM file
- * read-only at the same time, but only if different ::WIMStruct's are used. It
- * is @b not safe to mount multiple images from the same WIM file read-write at
- * the same time.
- *
- * wimlib_mount_image() cannot be used on an image that was exported with
- * wimlib_export_image() while the dentry trees for both images are still in
- * memory. In addition, wimlib_mount_image() may not be used to mount an image
- * that already has modifications pending (e.g. an image added with
- * wimlib_add_image()).
- *
- * @param wim
- * Pointer to the ::WIMStruct containing the image to be mounted.
- * @param image
- * The number of the image to mount, indexed starting from it. It must be
- * an existing, single image.
- * @param dir
- * The path to an existing empty directory to mount the image on.
- * @param mount_flags
- * Bitwise OR of the flags prefixed with WIMLIB_MOUNT_FLAG.
- * @param staging_dir
- * If non-NULL, the name of a directory in which the staging directory will
- * be created. Ignored if ::WIMLIB_MOUNT_FLAG_READWRITE is not specified
- * in @p mount_flags. If left @c NULL, the staging directory is created in
- * the same directory as the WIM file that @p wim was originally read from.
- *
- * @return 0 on success; nonzero on error.
- *
- * @retval ::WIMLIB_ERR_ALREADY_LOCKED
- * A read-write mount was requested, but an an exclusive advisory lock on
- * the on-disk WIM file could not be acquired because another thread or
- * process has mounted an image from the WIM read-write or is currently
- * modifying the WIM in-place.
- * @retval ::WIMLIB_ERR_FUSE
- * A non-zero status was returned by @c fuse_main().
- * @retval ::WIMLIB_ERR_INVALID_IMAGE
- * @p image does not specify an existing, single image in @p wim.
- * @retval ::WIMLIB_ERR_INVALID_PARAM
- * @p image is shared among multiple ::WIMStruct's as a result of a call to
- * wimlib_export_image(), or @p image has been added with
- * wimlib_add_image().
- * @retval ::WIMLIB_ERR_MKDIR
- * ::WIMLIB_MOUNT_FLAG_READWRITE was specified in @p mount_flags, but the
- * staging directory could not be created.
- * @retval ::WIMLIB_ERR_NOTDIR
- * Could not determine the current working directory.
- * @retval ::WIMLIB_ERR_RESOURCE_NOT_FOUND
- * One of the dentries in the image referenced a stream not present in the
- * WIM's lookup table (or in any of the lookup tables of the split WIM
- * parts).
- * @retval ::WIMLIB_ERR_WIM_IS_READONLY
- * ::WIMLIB_MOUNT_FLAG_READWRITE was specified in @p mount_flags, but @p
- * wim is considered read-only because of any of the reasons mentioned in
- * the documentation for the ::WIMLIB_OPEN_FLAG_WRITE_ACCESS flag.
- * @retval ::WIMLIB_ERR_UNSUPPORTED
- * Mounting is not supported, either because the platform is Windows, or
- * because the platform is UNIX-like and wimlib was compiled with @c
- * --without-fuse.
- *
- * This function can additionally return ::WIMLIB_ERR_DECOMPRESSION,
- * ::WIMLIB_ERR_INVALID_METADATA_RESOURCE, ::WIMLIB_ERR_METADATA_NOT_FOUND,
- * ::WIMLIB_ERR_NOMEM, ::WIMLIB_ERR_READ, or
- * ::WIMLIB_ERR_UNEXPECTED_END_OF_FILE, all of which indicate failure (for
- * different reasons) to read the metadata resource for the image to mount.