1

I'm working with a file type that is essentially just a zip file, the actually extension of it isn't a zip (let's say it's .foo), and when you rename test.foo to test.zip there is an index.xml file that contains lots of valuable information.

My question is: is there a way to convert the .foo file to a .zip, then open that zip and read the index.xml file (I know you can parse it, but can I open it while it's still in the .zip)?

I know this is possible on the server, but what I'd like to do is read the xml, convert it to JSON all on the client side, then send the necessary information to the server, which would make the process a lot faster.

Any help or pointers would be great, thanks!

user2442241
  • 815
  • 3
  • 10
  • 13
  • "which would make the process a lot faster.' Why? How large is the zip? Where does it come from? – PeeHaa Oct 02 '15 at 13:11
  • There is a Zip library for JavaScript [here](https://stuk.github.io/jszip/). I can't vouch for its quality, however. – Phylogenesis Oct 02 '15 at 13:12
  • @PeeHaa The file is a .nl2pkg, it's from a roller coaster simulator called NoLimits 2, essentially it contains information about the coasters in the park, their name, statistics, the park's name, etc. It can range anywhere from a couple of megabytes to gigabytes, depending on how detailed the park is. Gonna give the Unzipping files question a read, I looked around for about a day but didn't find that thread of anything that helped for some reason. – user2442241 Oct 02 '15 at 13:32

0 Answers0