so I'm making an iPhone app and part of the code is in C++. I'm loading an 80mb file which is basically just a lot of text, but I notice that same file when zipped is just 17mb which would be easier to open for an iPhone. How can I compress this file and at runtime decompress and read the decompressed string?
Asked
Active
Viewed 2,702 times
1
-
I know I can use zlib, but examples show me how to compress a file into another. Can someone give me an example of how to get a text file, compress it with zlib and later load it into memory as a string in C++? – Duxducis Oct 28 '12 at 19:57
-
Your comment is ambiguous..You have seen example which use zlib to compress into another file and you wish to load it now..so you can load the new file into memory right? Did you check this: http://zlib.net/zpipe.c – mots_g Oct 30 '12 at 08:50
3 Answers
0

Community
- 1
- 1

Johan Lundberg
- 26,184
- 12
- 71
- 97