Lymkwi / python-minetest

A python library to manipulate minetest's files
6 stars 3 forks source link

support the newer zstd compression #19

Open bobombolo opened 1 year ago

bobombolo commented 1 year ago

i heard on the minetest forums that this library doesn't support the latest world sqlite format -- something to do with zstd compression?

Lymkwi commented 1 year ago

It's not entirely surprising that my library doesn't support zstd compression. I wrote it more than half a decade ago (it's bad Python, the kind you write when you haven't been coding for long), and that's about when I last opened the game as well.

Are people still using this? It could be worth re-opening good ol' MT for the lols and seeing if I can update my stuff easily to support newer versions.

bobombolo commented 1 year ago

i would play with it and i know someone on the MT forum is trying to make a Minecraft to Minetest map converter in python...

Lymkwi commented 1 year ago

Update: I'm working on a fix for map versions >= 29, but currently python's zstd is unable to handle the mapblock data in minetest's files.. I'll work a bit more on it. Shouldn't be too hard.

teverett commented 9 months ago

@Lymkwi did you ever solve the zstd issue? I believe I am struggling with the same issue

Lymkwi commented 9 months ago

@Lymkwi did you ever solve the zstd issue? I believe I am struggling with the same issue

I think I managed to reproduce it but never figured anything useful out of the errors (or rather lack thereof) of Zstd. I had to dig in engine code to find the compression function and see if it did anything weird.. which it doesn't. Somehow it seems to be an incompatibility between python's Zstd and the library used by MT when both have default arguments.

Might try and give this a shot again, but I wouldn't expect a solution anytime soon

teverett commented 9 months ago

I did finally get it working. The problem seemed to be how I was using Redis. Once I had the right data, the decompression worked nicely.

Lymkwi commented 9 months ago

The problem seemed to be how I was using Redis.

In what sense exactly?