boolean keyEquals(Bytes keyBytes, MultiStoreBytes tmpBytes) { // check the length is the same. long keyLength = tmpBytes.readStopBit(); return keyLength == keyBytes.remaining() && tmpBytes.startsWith(keyBytes); }