Parse TLV
Walk a generic Tag-Length-Value byte structure with a configurable tag and length width: protocol frames, binary records, custom containers.
Runs on your device. The file is never uploaded.
Parse TLV walks a file as Tag-Length-Value records and prints each one's offset, tag, declared length and a 32-byte hex preview. The tag and length widths are each 1, 2 or 4 bytes, 1 by default, and multi-byte fields read big-endian until littleEndian is set. The walk always starts at byte 0 and stops after 5000 records.
Questions
What is this for?
Walking a generic Tag-Length-Value structure whose field widths you set yourself: protocol frames, binary log records, custom containers, smartcard-style records. It is not ASN.1 aware. Tags and lengths are read as plain fixed-width integers, so a DER file with multi-byte or high-tag-number encodings will not walk correctly here. Use Parse ASN.1 for DER.
What are the options?
Three. tagBytes and lengthBytes each take 1, 2 or 4 and both default to 1. littleEndian is off by default, meaning multi-byte tag and length fields are read big-endian, which is what most wire formats use. There is no offset option, so the walk always starts at byte 0; drop a leading header with Drop bytes first if your records do not start there.
How do I read a record line?
Each line starts with the record's offset in hex, then the tag in hex padded to the tag width, then the decimal length, then a hex preview of the first 32 value bytes, then the same bytes as ASCII between pipes with non-printables as dots. Values longer than 32 bytes show the total length after the preview and an ellipsis in the ASCII column.
Why did the walk stop early?
One of two reasons, and the line says which. Either the remaining bytes were too short for another tag and length header, reported as a count of trailing bytes at that offset, or a record declared a length longer than the bytes that remain, reported with the tag, the declared length and what was left. Both usually mean the field widths or the endianness are wrong, or the structure does not start at byte 0.
Why did I get "no complete TLV record found"?
Because the first record did not parse with the widths you chose, and the message repeats them back as tag=1B, length=1B or whatever you set. Try the other widths, switch littleEndian on, and check with Hexdump whether the file starts with a header that has to be dropped first.
Is there a limit on how many records it shows?
Yes, it stops after 5000 records and says so on the last line. Files that walk past that are usually the sign of a wrong width producing nonsense records, so read the first few lines carefully before trusting a long listing.