@Override
  public void writeBytes(final int record, final @NotNull ByteArraySequence bytes, final boolean fixedSize) throws IOException {
    waitForPendingWriteForRecord(record);

    withWriteLock(() -> {
      pendingWriteRequestsSize += bytes.getLength();
      if (pendingWriteRequestsSize > MAX_PENDING_WRITE_SIZE) {
        zipAndWrite(bytes, record, fixedSize);
      }
      else {
        pendingWriteRequests.put(record, writeRequestExecutor.submit(() -> {
          zipAndWrite(bytes, record, fixedSize);
          return null;
        }));
      }
    });
  }
@Override
  public void writeBytes(final int record, final @NotNull ByteArraySequence bytes, final boolean fixedSize)