compact method

  1. @override
int compact()
override

Truncate trailing free blocks at end-of-file and return bytes reclaimed.

Implementation

@override
int compact() {
  _guard();
  final reclaimed = _memoryPool.compact();
  if (reclaimed > 0) flush();
  return reclaimed;
}