[android-developers] Opening a gzipped raw resource file

2010-01-29 Thread greenrift
I have a gzipped (*.gz) file in my res/raw directory. I'm wanting to open and read from this file, however I'm a bit uncertain how to go about it. This is what I have currently: try{ InputStream is = this.getResources().openRawResource (R.raw.mygztextfile); BufferedReader reader = new

Re: [android-developers] Opening a gzipped raw resource file

2010-01-29 Thread Mark Murphy
I have a gzipped (*.gz) file in my res/raw directory. Why? The APK file is already a compressed archive. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the

Re: [android-developers] Opening a gzipped raw resource file

2010-01-29 Thread Justin Giles
Ok, I guess this is a misunderstanding on my part. So, after the application is installed on a users device, all contents remain compressed? The reason I'm compressing the file to begin with is to stay under the 1MB file file size limit for files in res/raw. Yeah, I could break things up into

Re: [android-developers] Opening a gzipped raw resource file

2010-01-29 Thread Mark Murphy
So, after the application is installed on a users device, all contents remain compressed? Most do, yes. Some things get unpacked I think (e.g., the compiled classes). The reason I'm compressing the file to begin with is to stay under the 1MB file file size limit for files in res/raw.

Re: [android-developers] Opening a gzipped raw resource file

2010-01-29 Thread Justin Giles
Yes, I see your point. Full story of what my issues are: This is for an update to my app. Currently my app is parsing a 700k text file and putting that into a database. This wasn't that big of a deal to me because my app still remains under 2MB on a users system and there are no issues in not

Re: [android-developers] Opening a gzipped raw resource file

2010-01-29 Thread Mark Murphy
1) I have a 1.9MB text file that I need to read and spit into a database. That's, um, big. This means that I will now have the 1.9MB text file (or files if I split) plus the storage for the database, thus almost doubling the footprint of my app. Yup. 2) Due to the higher footprint of my