Realm iv_table Structure in encrypted realm file

now i have been analyzing realm source code and fine some strange thing.
in source code, they save IV, hash of encrypted data, previous IV, has of previous encrypted data. but i thought it is ridiculous. when i decrypt a realm file, i just use IV(not previous IV). thus i guess if save previous IV in encrypted data then the size of realm file will be bigger and not use in mobile phone.

so my question is this

is there special reason for saving previous IV, and previous encrypted data??

if no reason, then plz modify that. i don’t want my file to be heavier

Encrypted Realm files do store the previous IV and previous hash of the cipher text. This is not large, only IV + hash = 32 + (28*8) = 256 bits of data. It appears you think that the Realm also stores the previous cipher text (which would be large), but it does not. Storing the previous IV and hash allows us to be fault tolerant across crashes because the IV is written to a different page than the cipher text. If you are interested in this, then I encourage you to read a very good explanation in the source code about it.