There is already public API calls for performing the aggregation of histograms: https://github.com/HdrHistogram/HdrHistogram/blob/master/src/main/java/org/HdrHistogram/AbstractHistogram.java#L566
for Java and C respectively. Is there something that these methods don't support? Also have a look at the HdrHistogram log format: https://github.com/HdrHistogram/HdrHistogram/blob/master/src/main/java/org/HdrHistogram/HistogramLogReader.java
. This uses a binary encoded, gzip compressed then base64 encoded representation of the histogram. This format is supported by both the Java and C (https://github.com/HdrHistogram/HdrHistogram_c/blob/master/src/hdr_histogram_log.h
) implementations. While more complex than a straight-forward JSON implementation, it provides a very compact on the wire representation.