kuligs2 hiroot what if you save the test data on disk, and compare sizes? what if you use other compression algos? Maybe the compression in ram makes no sense?
xyz hiroot First argument to decompress() is supposed to be buffer size, not mode. Check the reference. If you don't know the size use decompress_dynamic() instead. It also requires size limit as the first argument.
DaveTheCoder hiroot could anyone help? Please post code as text, instead of an image. Place ~~~ on lines before and after the code so that it will be correctly formatted. If you use print_debug()instead of print(), the output will show the line number of the statement, so that you can see which line is causing the error.
kuligs2 kuligs2 or maybe the .compress compresses the original data and does not return a value, like it says in the docs?
kuligs2 Here is source https://github.com/godotengine/godot/blob/0fdbf050e0c7fc7e0a9d42c2a41ee3bfdffbd8f1/core/io/compression.cpp#L50 on first look it looks like deflate is not supported?
kuligs2 DaveTheCoder If you use print_debug()instead of print(), the output will show the line number of the statement, so that you can see which line is causing the error. didnt know that, thanks 😃
xyz hiroot Thanks—you fixed my issue You're welcome. Always check the official reference for the functions you're using. Don't just blindly copy-paste the code.