Java – how to access SQLite database in zip file – Android

I have a 180 MB SQLite database. If I compress it, it will only be about 40 MB. I save the file in the asset folder and there is no problem in the APK size because it is compressed in the APK

However, when I copy the DB file from the asset folder to the phone memory or SD card, it is 180 MB

So, is there any way to use compressed DB files in Android?

resolvent:

Instead of having this database in APK, I suggest:

>Put the database into the server and selectively query the server to obtain records as needed; > Put the database file on the server and let the application download it to the SD card of the device when necessary

In other words, if you really want to go down the current road, you can assume to whip things with gzipinputstream

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>