Convert existing Zip data to ASTAR_NO_ZIP?

I’m currently working on a Windows Store/XBox port of my game, and obviously ran into the zip library issue. I have no problem using the ASTAR_NO_ZIP directive, the increased file size of the recast graphs isn’t a huge deal given the size of my game already, but the problem is that if I switch I lose all my graph settings/definitions. I don’t mind recaching everything, but having to completely redo graph setup is rough. Do you have a trick/utility to convert the zipped files over to non-zipped format? I can obviously write my own (the code is all there), but if its an already solved problem and I’m just missing something, I’d rather not spend the time.

TLDR: I need to take my zipped cache data and convert it to non-zipped format without losing everything in the process (re-scanning is fine, losing settings would suck).

-Sean

In case anyone else sees this/runs into this issue, I came up with a different solution. I ended up adding zip-file reading support to the ZipFile replacement script specifically for NETFX_CORE compilation. You can use System.Compression.ZipArchive to unzip the stream so long as you skip the first two bytes, which are an incompatible, unnecessary header bytes apparently. Anyway, there’s a lot more bug fixing necessary (for example, while you need TypeInfo for most things, you still need to use the type object for GetFields…), but I was able to eventually get it working and move on to the other 10 million things that don’t work right on the WindowsStore platform :wink:

So yeah, you could probably just use ZipArchive to write data too for NETFX_CORE platforms and not have to use ASTAR_NO_ZIP at all, it just wasn’t worth the effort for me since I only needed to read the cache data I wrote from the editor. If its useful though, I’d be happy to share my horribly hacky code.

-Sean

1 Like