Expand description
This module contains the code to compress/decompress data for Total War games.
The traits Compressible and Decompressible within this module contain functions to compress and decompress
data from/to CA’s different supported compression formats. Implementations of these two traits for &[u8] are provided within this module.
§Supported Formats
See CompressionFormat for details on the supported compression formats (LZMA1, Lz4, Zstd) and their file structure.
§Important Notes
-
Due to an game bug, compressing tables tends to cause crashes when starting for some people. This bug seems to have been fixed in WH3, but all other games before WH3 may still suffer from it, so unless manually forced to, this lib will not compress tables in those games. Tables will only be compressed in WH3 and newer games.
-
Compressed files are only supported on PFH5 Packs (Since Total War: Warhammer 2).
Enums§
- Compression
Format - Compression formats supported by TW Games.
Traits§
- Compressible
- Internal trait to implement compression over a data type.
- Decompressible
- Internal trait to implement decompression over a data type.