Posted on April 12, 2015 at 7:29 PM
I'm attempting to use SevenZip for compression in a Unity 5 game that I'm working on. It works fantastically so far, however, when I attempt to compile the game for WebGL (HTML5), I keep getting a Data Error Exception when it runs. Initially, I thought there might be something wrong with the data file itself, so I made a really small project and reviewed the contents of the file, the arrangement of the bytes, and so on. This review proved that the file itself was not at fault.
Attached is the sample project in question. If you run the project in the Unity editor (you may have to load the Test scene first) and look at the console output, there are results of the test as they are expected. They should all pass. If you compile the project to WebGL and then run that build in a browser, then you'll see the Data Error Exception print out when the bytes are supposed to be decompressed. (directly after the debug and right before the tests)
LZMA Compression Sample - Unity 5 Project