@Override
  public ByteArraySequence read(@NotNull DataInput in) throws IOException {
    byte[] buf = ArrayUtil.newByteArray(((InputStream)in).available()); // todo fix double copying
    in.readFully(buf);
    return ByteArraySequence.create(buf);
  }
@Override
  public ByteArraySequence read(@NotNull DataInput in)