I've updated it for Godot 4 here: https://gist.github.com/vmedea/fce1d6d7fb6a0a4d9f1f89c188cb6197
The mentioned issue with open_compressed still exists, but I've worked around it in a different way: by reading the xp file into memory, then using the new function decompress_dynamic, then decoding directly from that buffer, avoiding the need for a temporary file.
The mentioned issue with open_compressed still exists, but I've worked around it in a different way: by reading the xp file into memory, then using the new function decompress_dynamic, then decoding directly from that buffer, avoiding the need for a temporary file.