Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Android compress raw XML resources?

Tags:

android

Does Android compress raw XML resources i.e. those under res/xml directory?

I have some resources in the assets and planning to move them to res/xml (so I can localize them) but I'm not sure if they will be compressed then.

I understand I can check this out by unzipping some apk but maybe someone already knows?

like image 206
Alexander Kulyakhtin Avatar asked Nov 03 '22 03:11

Alexander Kulyakhtin


1 Answers

Please take a look at this blog post by Brian Hardy. All "compressible files" are compressed even xml files. Xml files are compressed by aapt into a binary format. If you don't want your files to be compressed, you can save them as one of the file types in the blog post. Also, you can package your data into a .zip file (android won't try to compress it) and then unzip it yourself when reading it.

like image 143
Justin Vartanian Avatar answered Nov 15 '22 11:11

Justin Vartanian