not sure if this should be in a different ns, maybe `riemann.codec`?