private static void assertMediumHeaderIsValid(@NotNull ByteBuffer buffer,
                                                  int entryStartOffset,
                                                  byte firstByte) {
      assert buffer.limit() >= entryStartOffset + MEDIUM_HEADER_SIZE
        : "Invalid record(@" + entryStartOffset + ") format: " +
          "header[0](=" + Integer.toBinaryString(Byte.toUnsignedInt(firstByte)) + " -> medium record) but there is no header[1] byte. " +
          "buffer[pos: " + buffer.position() + ", lim: " + buffer.limit() + "]:  " + IOUtil.toHexString(buffer);
    }
private static void assertMediumHeaderIsValid(@NotNull ByteBuffer buffer,
                                                  int entryStartOffset,
                                                  byte firstByte)