My limited knowledge with gmond wire format is from a quick scan of the GangliaContext*.java source.
I have a question that I hope Ganglia experts can answer: the wire format seems sparse, in that it contains full key value pairs. I wonder if the update can be sparse as well, i.e., the metrics that haven't changed since the last snapshot doesn't need to be sent to gmond as well. The metrics2 system allows sparse update to reduce object/bandwidth usage.
If the update can be sparse, it quite straight forward to adapt FileSink and GangliaContext code. OTOH, If only dense update is allowed, o.a.h.metrics2.util.MetricsCache can be used.