"new format is not wider than old");
logger.info("upgrading {} ratings from {} to {}", index, format, newFormat);
ByteBuffer oldBuffer = ByteBuffer.allocateDirect(format.getRatingSize());
ByteBuffer newBuffer = ByteBuffer.allocateDirect(newFormat.getRatingSize());
MutableRating scratch = new MutableRating();
long oldPos = BinaryHeader.HEADER_SIZE + index * format.getRatingSize();
Preconditions.checkState(channel.position() == oldPos,
"channel is at the wrong position");
long newPos = BinaryHeader.HEADER_SIZE + index * newFormat.getRatingSize();