right, my mistake. i can achieve the same thing by sticking the contents in assets and reading the data from there.

thanks.

On 8/28/09 6:23 AM, Mark Murphy wrote:
  
i need to place a zip file in my resources (it is about 400k). i
understand i can get a handle to the stream, to load the zip via
ZipInputStream from that location, but in order to be memory conscious i
really need to get a handle to a ZipFile. what are my options?

i understand i can read the zip, then write it out to /data/... and
create a ZipFile based on the file in /data/... however, then i'm using
400k extra internal memory for my app. so, i can either,

1. load the data from a ZipInputStream and keep it all in memory (about
1.7MB in text form)
2. read the stream and write it out to /data/... (a ~400k zip file) and
then create a ZipFile based on the file in /data/...

? any other possibilities?
    
The APK file *is* a ZIP file, so if your goal is merely compression,
perhaps consider not storing it as a ZIP in the APK, but just store the
original data in the APK.

  

--

Reply via email to