The original bucket to be rebuilt.
Entries that were not included in the previous bucket.
Updates to be applied to the bucket.
Indicates if the bucket is the level head.
Function to determine if an entry is a boundary.
A tuple containing the rebuilt buckets, leftover entries, and entry differences.
The bucket
must end in a boundary or be a head, otherwise this will throw an error.
The leftovers
array must be empty or contain entries which precede any entries inside bucket
.
If no updates result in changes to the bucket, the same bucket reference is returned.
If isHead
is true, no leftover entries will be returned.
If no updates affect the bucket boundary then buckets.length
will be 1.
If a boundary is added by an add update then buckets.length
will be +1.
If a boundary is removed by an rm update then buckets.length
will be -1.
It writes +1 to bucketsRebuilt
for each bucket rebuilt.
Rebuilds a bucket from the given updates.