static long sizeOf(KeyBuffer key, byte[] value) { // calculate the same value as the original impl would do return Util.ENTRY_OFF_DATA + Util.roundUpTo8(key.array().length) + value.length; }