Important information: this site is currently scheduled to go offline indefinitely by end of the year.

[HELP] Xmem decompression error with MC360 chunk data

Read or post about compression. And decompression. Or ask questions how to decompress your files.
Post Reply
theunholyone
ultra-n00b
Posts: 2
Joined: Fri Mar 19, 2021 9:37 pm

[HELP] Xmem decompression error with MC360 chunk data

Post by theunholyone »

The data can be decompresses using the official XDK Xmemdecompress API but fails with MSPACK_ERR_DECRUNCH when using quickbms implementation in Linux or Mac, which uses libmspack lzx_decompress with window size 17 and a modified read function from UEViewer.
The file does not use native compression and has a standard 0xFF header.

(libmspack impl: https://github.com/kyz/libmspack/blob/m ... ack/lzxd.c)
(UEViewer modified sys_read function https://github.com/gildor2/UEViewer/blo ... on.cpp#L90)

The script used is the following:

Code: Select all

endian big
comtype xmemdecompress

get ZSize long
get Size long
math ZSize &= 0x7fffffff
clog result Offset ZSize Size
And the file is: https://www.mediafire.com/file/5od3897o ... k.dat/file

For clarification, all other types of files such as savegames decompress perfectly, but all chunk data that I've tried fails. I'm going to try debug or at least identify the problematic lzx blocks, but I thought posting it here would be a good idea in case someone has any clue of what might be happening. :keke:

(Crossposting from ZenHax: https://zenhax.com/viewtopic.php?f=9&t=15062)
User avatar
DKDave
ultra-veteran
ultra-veteran
Posts: 357
Joined: Mon May 06, 2019 6:07 pm
Location: On board the USS Callister
Has thanked: 9 times
Been thanked: 167 times

Re: [HELP] Xmem decompression error with MC360 chunk data

Post by DKDave »

It is standard xmemlzx. If you use offset + 8 as the starting point, it will work. I'm not sure what 'Size' refers to, but the decompressed size is 0x21BF of that chunk.
I see a vision rising, dreary, Fading in as children play twilight games, In the town called Ordinary, An eye of light reveals a gateway to doomsday
theunholyone
ultra-n00b
Posts: 2
Joined: Fri Mar 19, 2021 9:37 pm

Re: [HELP] Xmem decompression error with MC360 chunk data

Post by theunholyone »

Yes, it is. The issue is that the quickbms implementation that doesn't rely on the XDK (which is the one used in Linux and Mac) fails to decompress the file.
Post Reply