@Override
    public KnownSizeRecordWriter writerFor(@NotNull LightFilePath key) throws IOException {
      VirtualFile root = key.getRoot();
      if (!myRootsReversed.containsKey(root)) {
        throw new IOException("Unknown root " + root.getPath() + " for path " + key.getRelativePath() + ". All roots " + myRoots);
      }

      byte[] relativePathBytes = key.getRelativePath().getBytes(UTF_8);
      int rootIndex = myRootsReversed.getInt(root);
      return new KnownSizeRecordWriter() {
        @Override
        public ByteBuffer write(@NotNull ByteBuffer data) {
          return data.putInt(rootIndex)
            .put(relativePathBytes);
        }

        @Override
        public int recordSize() {
          return relativePathBytes.length + Integer.BYTES;
        }
      };
    }
@Override
    public KnownSizeRecordWriter writerFor(@NotNull LightFilePath key)