BER-TLV parser and builder