Hey joofer123,
thx for your code! My solution is very similar to your one. The only difference is that you can create compression objects with zlib.compressobj() which allows you to specify the same "-15" parameter that allowed you to decompress the file. This way you dont have to cut of header and footer manually.
One weird characteristic that i found was that if you decompress and compress the file without any changes, the resulting file can differ by a lot of bytes from the original nson file. Still unity accepts it with no problem. The weird part is that from the 3 files i used 1 didn't differ at all, 1 differed by 18 bytes and the third one differed by way more bytes. Again all 3 were accepted by unity. At least in my setup.
thx for your code! My solution is very similar to your one. The only difference is that you can create compression objects with zlib.compressobj() which allows you to specify the same "-15" parameter that allowed you to decompress the file. This way you dont have to cut of header and footer manually.
One weird characteristic that i found was that if you decompress and compress the file without any changes, the resulting file can differ by a lot of bytes from the original nson file. Still unity accepts it with no problem. The weird part is that from the 3 files i used 1 didn't differ at all, 1 differed by 18 bytes and the third one differed by way more bytes. Again all 3 were accepted by unity. At least in my setup.