// 2023.09.09: 0x400000 and 2 are optimal for i9-12900K. // Further increasing the buffer size reduced the extraction speed. #define UNP_READ_SIZE_MT … #define UNP_BLOCKS_PER_THREAD … struct UnpackThreadDataList { … }; THREAD_PROC(UnpackDecodeThread) { … } void Unpack::InitMT() { … } void Unpack::Unpack5MT(bool Solid) { … } // Decode Huffman block and save decoded data to memory. void Unpack::UnpackDecode(UnpackThreadData &D) { … } // Process decoded Huffman block data. bool Unpack::ProcessDecoded(UnpackThreadData &D) { … } // For large blocks we decode and process in same function in single threaded // mode, so we do not need to store intermediate data in memory. bool Unpack::UnpackLargeBlock(UnpackThreadData &D) { … }