@Rama - I’m currently trying to read image files out of a .zip archive. Right now I’m using a third party library (miniz), but it doesn’t handle the file IO properly for UE4’s purposes.
Is there a way to load in a ZIP and get all the files out of it/uncompress them in the engine somewhere? I’ve tried looking in the docs and API a lot, but all the archive related functionality is pretty opaque to me. I just need to know if there’s a way to do it with the engine classes, as right now I have it hacked to load the zip using the built in functionality (load to binary array ala your save/load system), and then use miniz’s initialization from memory, but it seems to fail somewhere along the way.
I’m not looking forward to rewriting the little library to use UE4’s file and memory functionality, but if there’s nothing in the engine for what I need to do (just load a zip, get a list of files, uncompress them to the head as binary data).
Any tips you could give me would be much appreciated - I’m going to be updating my TextureFromDisk functionality to handle other files than DDS, but I can’t test that until I get the zip loading working.
Edit: Miniz was failing because it was using the stock memcpy - but when I tried including something into miniz.c in order to get access to UE’s FMemory functions, it caused a bunch of compilation errors.
For now I’ve decided to rewrite this other library, JUnzip, with UE4 file IO classes, since it seems all of the libraries available rely on regular file/memory access.
Edit #2: Got it working I’m going to be working on more advanced support and building out my comic book reader. I’ll probably release the zip plugin on the marketplace for a few bucks.