code: public byte[] encode(final int id, 
                         final Histogram data_point, 
                         final boolean include_id) {
      final HistogramDataPointCodec codec = getCodec(id);
      return codec.encode(data_point, include_id);
    }
docs: Finds the proper codec and calls it's encode method to create a byte array
  with the given ID as the first byte.
  @param id The ID of the histogram type to search for.
  @param data_point The non-null data point to encode.
  @param include_id Whether or not to include the ID prefix when encoding.
  @return A non-null and non-empty byte array if the codec was found.
  @throws IllegalArgumentException if no codec was found for the given ID or
  the histogram may have been of the wrong type or failed encoding.