The signature of a callback used to determine if compaction should be attempted.
The result of the callback decides if the
Realm should be compacted
before being returned to the user.
The callback is given two arguments:
totalSizeof the realm file (data + free space) in bytes, and
usedSize, which is the number bytes used by data in the file.
It should return true to indicate that an attempt to compact the file should be made. The compaction will be skipped if another process is currently accessing the realm file.
typedef ShouldCompactCallback = bool Function(int totalSize, int usedSize);