Awful, horrible hack to try encoding/decoding histograms.