/* mainKey is only used for dups. */
byte[] mainKey = binRef.getKey();
boolean isDup = (binRef.getData() != null);
while (iter.hasNext()) {
Key key = (Key) iter.next();
/*
* Lookup the BIN for each deleted key, and compress that BIN
* separately.
*/
BIN splitBin = isDup ?
searchForBIN(db, mainKey, key.getKey()) :
searchForBIN(db, key.getKey(), null);
if (splitBin != null) {
BINReference splitBinRef = splitBin.createReference();
splitBinRef.addDeletedKey(key);
compressBin(db, splitBin, splitBinRef, tracker);
}