- /** If set to 1, the default parameters for the specified algorithm are
- * used rather than the ones specified in the following union. */
- uint32_t use_defaults : 1;
-
- union {
- /** Parameters for the fast algorithm. */
- struct wimlib_lzx_fast_params {
- uint32_t fast_reserved1[10];
- } fast;
-
- /** Parameters for the slow algorithm. */
- struct wimlib_lzx_slow_params {
- /** If set to 1, the compressor can output length 2
- * matches. If set 0, the compressor only outputs
- * matches of length 3 or greater. Suggested value: 1
- */
- uint32_t use_len2_matches : 1;
-
- uint32_t slow_reserved1 : 31;
-
- /** Matches with length (in bytes) longer than this
- * value are immediately taken without spending time on
- * minimum-cost measurements. Suggested value: 32. */
- uint32_t num_fast_bytes;
-
- /** Number of passes to compute a match/literal sequence
- * for each LZX block. This is for an iterative
- * algorithm that attempts to minimize the cost of the
- * match/literal sequence by using a cost model provided
- * by the previous iteration. Must be at least 1.
- * Suggested value: 2. */
- uint32_t num_optim_passes;
-
- /** Reserved; set to 0. */
- uint32_t slow_reserved_blocksplit;
-
- /** Maximum depth to search for matches at each
- * position. Suggested value: 50. */
- uint32_t max_search_depth;
-
- /** Maximum number of potentially good matches to
- * consider for each position. Suggested value: 3. */
- uint32_t max_matches_per_pos;
-
- uint32_t slow_reserved2[2];
-
- /** Assumed cost of a main symbol with zero frequency.
- * Must be at least 1 and no more than 16. Suggested
- * value: 15. */
- uint8_t main_nostat_cost;
-
- /** Assumed cost of a length symbol with zero frequency.
- * Must be at least 1 and no more than 16. Suggested
- * value: 15. */
- uint8_t len_nostat_cost;
-
- /** Assumed cost of an aligned symbol with zero
- * frequency. Must be at least 1 and no more than 8.
- * Suggested value: 7. */
- uint8_t aligned_nostat_cost;
-
- uint8_t slow_reserved3[5];
- } slow;
- } alg_params;
-};
-
-/** Opaque LZX compression context. */
-struct wimlib_lzx_context;
-
-/** @} */
-/** @ingroup G_general
- * @{ */
-
-/**
- * Possible values of the error code returned by many functions in wimlib.
- *
- * See the documentation for each wimlib function to see specifically what error
- * codes can be returned by a given function, and what they mean.
- */
-enum wimlib_error_code {
- WIMLIB_ERR_SUCCESS = 0,
- WIMLIB_ERR_ALREADY_LOCKED,
- WIMLIB_ERR_DECOMPRESSION,
- WIMLIB_ERR_DELETE_STAGING_DIR,
- WIMLIB_ERR_FILESYSTEM_DAEMON_CRASHED,
- WIMLIB_ERR_FORK,
- WIMLIB_ERR_FUSE,
- WIMLIB_ERR_FUSERMOUNT,
- WIMLIB_ERR_GLOB_HAD_NO_MATCHES,
- WIMLIB_ERR_ICONV_NOT_AVAILABLE,
- WIMLIB_ERR_IMAGE_COUNT,
- WIMLIB_ERR_IMAGE_NAME_COLLISION,
- WIMLIB_ERR_INSUFFICIENT_PRIVILEGES,
- WIMLIB_ERR_INTEGRITY,
- WIMLIB_ERR_INVALID_CAPTURE_CONFIG,
- WIMLIB_ERR_INVALID_CHUNK_SIZE,
- WIMLIB_ERR_INVALID_COMPRESSION_TYPE,
- WIMLIB_ERR_INVALID_HEADER,
- WIMLIB_ERR_INVALID_IMAGE,
- WIMLIB_ERR_INVALID_INTEGRITY_TABLE,
- WIMLIB_ERR_INVALID_LOOKUP_TABLE_ENTRY,
- WIMLIB_ERR_INVALID_METADATA_RESOURCE,
- WIMLIB_ERR_INVALID_MULTIBYTE_STRING,
- WIMLIB_ERR_INVALID_OVERLAY,
- WIMLIB_ERR_INVALID_PARAM,
- WIMLIB_ERR_INVALID_PART_NUMBER,
- WIMLIB_ERR_INVALID_PIPABLE_WIM,
- WIMLIB_ERR_INVALID_REPARSE_DATA,
- WIMLIB_ERR_INVALID_RESOURCE_HASH,
- WIMLIB_ERR_INVALID_UNMOUNT_MESSAGE,
- WIMLIB_ERR_INVALID_UTF16_STRING,
- WIMLIB_ERR_INVALID_UTF8_STRING,
- WIMLIB_ERR_IS_DIRECTORY,
- WIMLIB_ERR_IS_SPLIT_WIM,
- WIMLIB_ERR_LIBXML_UTF16_HANDLER_NOT_AVAILABLE,
- WIMLIB_ERR_LINK,
- WIMLIB_ERR_METADATA_NOT_FOUND,
- WIMLIB_ERR_MKDIR,
- WIMLIB_ERR_MQUEUE,
- WIMLIB_ERR_NOMEM,
- WIMLIB_ERR_NOTDIR,
- WIMLIB_ERR_NOTEMPTY,
- WIMLIB_ERR_NOT_A_REGULAR_FILE,
- WIMLIB_ERR_NOT_A_WIM_FILE,
- WIMLIB_ERR_NOT_PIPABLE,
- WIMLIB_ERR_NO_FILENAME,
- WIMLIB_ERR_NTFS_3G,
- WIMLIB_ERR_OPEN,
- WIMLIB_ERR_OPENDIR,
- WIMLIB_ERR_PATH_DOES_NOT_EXIST,
- WIMLIB_ERR_READ,
- WIMLIB_ERR_READLINK,
- WIMLIB_ERR_RENAME,
- WIMLIB_ERR_REOPEN,
- WIMLIB_ERR_REPARSE_POINT_FIXUP_FAILED,
- WIMLIB_ERR_RESOURCE_NOT_FOUND,
- WIMLIB_ERR_RESOURCE_ORDER,
- WIMLIB_ERR_SET_ATTRIBUTES,
- WIMLIB_ERR_SET_REPARSE_DATA,
- WIMLIB_ERR_SET_SECURITY,
- WIMLIB_ERR_SET_SHORT_NAME,
- WIMLIB_ERR_SET_TIMESTAMPS,
- WIMLIB_ERR_SPLIT_INVALID,
- WIMLIB_ERR_STAT,
- WIMLIB_ERR_TIMEOUT,
- WIMLIB_ERR_UNEXPECTED_END_OF_FILE,
- WIMLIB_ERR_UNICODE_STRING_NOT_REPRESENTABLE,
- WIMLIB_ERR_UNKNOWN_VERSION,
- WIMLIB_ERR_UNSUPPORTED,
- WIMLIB_ERR_UNSUPPORTED_FILE,
- WIMLIB_ERR_VOLUME_LACKS_FEATURES,
- WIMLIB_ERR_WIM_IS_READONLY,
- WIMLIB_ERR_WRITE,
- WIMLIB_ERR_XML,
-};
-
-
-/** Used to indicate no WIM image or an invalid WIM image. */
-#define WIMLIB_NO_IMAGE 0
-
-/** Used to specify all images in the WIM. */
-#define WIMLIB_ALL_IMAGES (-1)