JavaScript TLV Decoder