I’m pretty sure there was, at some point, a method in which you could decompress Bytes loaded from a file using the GZIP compression method but I cannot seem to find an example of that.
Is there an example where this can be done, or will I need to extern a GZIP library for the target language?
Here is an example of what I’ve tried so far:
var fontsPath = "data/fonts.dat"; var fontsFile = File.getBytes(fontsPath); var fontsData = ByteArray.fromBytes(fontsFile); fontsData.uncompress(ZLIB); var count = fontsData.readInt(); trace(count);
I think, however, the way OpenFL’s implementation works is that it assumes the file is an ordinary ZIP, which it isn’t.
I’m getting the error:
ZLib Error: Incorrect header check (-3) when launching the application.