-/*
- * compress_func_t- Pointer to a function to compresses a chunk
- * of a WIM resource. This may be either
- * wimlib_xpress_compress() (xpress-compress.c) or
- * wimlib_lzx_compress() (lzx-compress.c).
- *
- * @chunk: Uncompressed data of the chunk.
- * @chunk_size: Size of the uncompressed chunk, in bytes.
- * @out: Pointer to output buffer of size at least (@chunk_size - 1) bytes.
- *
- * Returns the size of the compressed data written to @out in bytes, or 0 if the
- * data could not be compressed to (@chunk_size - 1) bytes or fewer.
- *
- * As a special requirement, the compression code is optimized for the WIM
- * format and therefore requires (@chunk_size <= 32768).
- *
- * As another special requirement, the compression code will read up to 8 bytes
- * off the end of the @chunk array for performance reasons. The values of these
- * bytes will not affect the output of the compression, but the calling code
- * must make sure that the buffer holding the uncompressed chunk is actually at
- * least (@chunk_size + 8) bytes, or at least that these extra bytes are in
- * mapped memory that will not cause a memory access violation if accessed.
- */
-typedef unsigned (*compress_func_t)(const void *chunk, unsigned chunk_size,
- void *out);
-
-static compress_func_t
-get_compress_func(int out_ctype)
-{
- if (out_ctype == WIMLIB_COMPRESSION_TYPE_LZX)
- return wimlib_lzx_compress;
- else
- return wimlib_xpress_compress;
-}
-