HF RL Explorer

Create a program decode tlv.py that reads a binary file of Tag-Length-Value (TLV) records with length…

Create a program decode tlv.py that reads a binary file of Tag-Length-Value (TLV) records with length…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). The output must be a single JSON array of objects, each with keys "tag" (integer), "length" (integer, the decoded…

The task

The output must be a single JSON array of objects, each with keys "tag" (integer), "length" (integer, the decoded byte-length), "value" (string or integer per tag), and "value_hex" (always present, the lowercase hex of the raw value bytes). Objects must appear in file order. If tag 0x0000 is encountered, it is NOT…

Part of ai-and/termgrade-environments.