The Surge 2 Lz4 Frame compression

Programming related discussions related to game research
yusuf2020
Posts: 106
Joined: Wed Jun 17, 2020 1:12 pm

The Surge 2 Lz4 Frame compression

Post by yusuf2020 »

I'm making a tool to repack files but i'm having some problem about compression
I can decompress the file but when i compress it, it is not same as the file at the beginning

These are files
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: The Surge 2 Lz4 Frame compression

Post by aluigi »

Your code is correct.
What's missing is the checksum at the end of the compressed file, that 0x2a0fdc2d is a XXH32 (32bit xxHash) calculated on the decompressed data.