docs: private byte[] serialized(Set<String> excluded) {
          Feature[] includedFeatures = featuresSorted(excluded);
          final var featureNr = includedFeatures.length;
          byte[][] featuresSerialized = new byte[featureNr][];
          var i = 0;
          var size = 0;
          for (final var feature : includedFeatures) {
              featuresSerialized[i] = feature.serialized();
              size += featuresSerialized[i].length;
              i++;
          }
  
          final var buffer = ByteBuffer.allocate(size + Integer.BYTES * (featureNr + 1));
          buffer.putInt(MAGIC);
          for (final var featureSerialized : featuresSerialized) {
              buffer.putInt(featureSerialized.length);
              buffer.put(featureSerialized);
          }
          return buffer.array();
      }