How to access SQLite database in zip file - android

I have a 180 MB SQLite database. If I compress it, it will be only about 40 MB. I store the file in the assets folder and there is no problem with the apk size as it is compressed in apk.

But when I copy the db file from the assets folder to the phone or SD card, then it is 180 MB.

So, is there a way to use a compressed db file in android?

+4
source share
1 answer

Unlike this database in the APK itself, I would suggest either:

  • Putting the database on the server and a selective server request for records only as necessary;
  • SD- , .

, - GZIPInputStream, .

0

Source: https://habr.com/ru/post/1614032/


All Articles