Minetest Cereal, Week 5: So close, and yet ...

There was no specific update for week 4.

Working with a singlenode (all air) map, I treated the data blob as an input stream, pulling out data 8, 16, or 32 bits based on the documentation. Here's what I've been able to gather:

If I pull those two bytes from the data (I don't see them documented) I can run a gzip-based decompressor on the next chunk of the stream, and get:

After that, the world format says I should expect:

zlib-compressed node metadata list
- content:
if map format version <= 22: 
  ....
if map format version >= 23: 
  u8 version (=1) -- Note the type is u8, while for map format version <= 22
it's u16 
  u16 count of metadata
  foreach count:
    u16 position (p.Z*MAP_BLOCKSIZE*MAP_BLOCKSIZE + p.Y*MAP_BLOCKSIZE + p.X)
    u32 num_vars
    foreach num_vars:
      u16 key_len
      u8[key_len] key 
      u32 val_len
      u8[val_len] value
    serialized inventory

Unfortunately, trying to decompress the remaining bytes generates an error, and I can't seem to match what's left with the description. I've also tried looking at the C++ code in node_metadata.cpp, but it's my first look at C++ and there's a fair bit that is beyond me.

I'm going back to the Minetest forum for hand with this.