@giltene I thought I was done with it after writing the log readers/writers classes and decode the jhiccup log. It busted on the cookie check and now I know why the cookie had this 8 << 4 in it and I see all those Int, Short histogram classes, this whole code is bigger in scope than I realized.
Obviously 32-bit counters take less space and would work in a lot of cases. If encoded size was the main purpose, something like GPB (Google Protocol Buffer) to encode a histogram would make sense as it would automatically encode each count with the smallest number of bits (GPB is pretty fast in C) and would avoid using zlib.
Or was the main purpose to save space in application memory?