shouldCompact
This method determines if the Realm file should be compacted before opened and returned to the user.
Return
true
to indicate an attempt to compact the file should be made. Otherwise, compaction will be skipped.
Parameters
totalBytes
the total file size (data + free space).
usedBytes
the total bytes used by data in the file.