StormLib API Reference

SFileSetDataCompression

Description

bool WINAPI SFileSetDataCompression(
  DWORD DataCompression             // Data compression mask
);

Function SFileSetDataCompression configures compression mask for subsequent calls to SFileAddFile. The compression mask is remembered until changed.

Parameters

DataCompression
[in] Bit mask of data compression. This parameter can be one or more of the following values:
Value Meaning
MPQ_COMPRESSION_ZLIB
(0x02)
Use ZLIB compression library. This bit cannot be combined with MPQ_COMPRESSION_BZIP2 or MPQ_COMPRESSION_LZMA.
MPQ_COMPRESSION_PKWARE
(0x08)
Use Pkware Data Compression Library. This bit cannot be combined with MPQ_COMPRESSION_LZMA.
MPQ_COMPRESSION_BZIP2
(0x10)
Use BZIP2 compression library. This bit cannot be combined with MPQ_COMPRESSION_ZLIB or MPQ_COMPRESSION_LZMA.
MPQ_COMPRESSION_SPARSE
(0x20)
Use SPARSE compression. This bit cannot be combined with MPQ_COMPRESSION_LZMA.
MPQ_COMPRESSION_LZMA
(0x12)
Use LZMA compression. This value can not be combined with any other compression method.
Note that MPQ_COMPRESSION_HUFFMANN, MPQ_COMPRESSION_ADPCM_MONO and MPQ_COMPRESSION_ADPCM_STEREO cannot be used as data compressions and SFileSetDataCompression rejects them.

Return Value

When the function succeeds, it returns nonzero. On an error, the function returns false and GetLastError gives the error code.

Availability in Storm.dll

Available in Storm.dll No
Ordinal number in Storm.dll 1.00 N/A
Ordinal number in Storm.dll 1.09 N/A