code: @Override
    public void serialize(DataOutput out) throws IOException {
      // TODO: Should we transport the performance tweak 'doCacheCardinalities'?
      out.writeBoolean(signedLongs);
  
      out.writeInt(highToBitmap.size());
  
      for (Entry<Integer, BitmapDataProvider> entry : highToBitmap.entrySet()) {
        out.writeInt(entry.getKey().intValue());
        entry.getValue().serialize(out);
      }
    }
docs: Serialize this bitmap.
  
  Unlike RoaringBitmap, there is no specification for now: it may change from onve java version
  to another, and from one RoaringBitmap version to another.
  
  Consider calling {@link #runOptimize} before serialization to improve compression.
  
  The current bitmap is not modified.
  
  @param out the DataOutput stream
  @throws IOException Signals that an I/O exception has occurred.