Basic TLV message serialize library