Hi guys,
I got 2 problems and I want to hear your thought:
1. Based on a SQL database (file size 85MB) I create new SQLCipher database but its size is bigger (90MB). I don't understand why.
2. When I compile with the old SQL database named "data.db" => Result apk file size is only 28MB because the database is compressed. But when I compile with new SQLCipher database named "datacipher.db" => Result apk file size is 93MB! The reason is "datacipher.db" is not compressed and I don't know why too.
Did you face that problems? Please share your idea/solution. Thank you so much.
1. SQLCipher encrypts the data before it is saved. It might be slightly bigger. The difference in this case is pretty small (5%).
2. You cannot compress encrypted data as the data is more or less "random".
It is not possible to compress encrypted data. Does all of this data need to be compressed? Maybe you can use a different solution that only compresses the sensitive columns?
The database is simple with 3 columns: id, text1, text2. Each text have 5,000 - 10,000 words. And total 22,500 records. I need to encrypt it because it's exclusive content.
I tried to encrypt the content then add to database but the result is bigger than SQLCipher database so I really stuck in this problem.
Surely the solution is to compile the app with an empty database and when the app first runs download the filled database from a web server. This would also have the advantage of being able to update the system without recompiling a new apk.
Surely the solution is to compile the app with an empty database and when the app first runs download the filled database from a web server. This would also have the advantage of being able to update the system without recompiling a new apk.
The problem is with SQL database, my app (apk file) is only 28MB. After encrypt database with SQLCipher it growns up to 90MB (only database file). I don't think the users want to download that huge file.