Librato cbuf encoder

This won't work for annotated graphs