Hi,

According to 'unzip -v' command for my own apk file, the zip-file is 
compressed:

   4653  Defl:N     1132  76%  03-19-14 00:18  e65916c3 
 assets/layout/gfx720/profile.xml

76% of the file is the compression ratio.

Use built-in java Zip* classes to access your contents inside APK if you 
don't want to use AssetManager:

http://developer.android.com/reference/java/util/zip/ZipFile.html
http://developer.android.com/reference/java/util/zip/ZipInputStream.html

On Thursday, March 20, 2014 8:27:14 PM UTC+4, sushant sharma wrote:
>
> Hi, 
> The questions I have is: 
>
> 1) Are the files kept in "assets" folder compressed when apk is zipped. 
> 2) Are the files kept in "res/raw" folder compressed when apk is zipped. 
>
>
> Lets say if the answer to the questions is Yes, ie, the files are 
> compressed. 
> 1) Does this mean that AssetManager does the decompression and then gives 
> us the istream?
> 2) Lets assume that I don't go through the AssetManager and read the file 
> directly by accessing the apk path and the offset (The FileDescriptor 
> method). If the file was compressed, the bytes I will read after doing an 
> fopen() will not make sense to me, right?
>
>
> Thanks 
> Sushant
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to