Write a Python script at /app/decode tlv.py that reads a binary file from a path given as the first CLI…
Write a Python script at /app/decode tlv.py that reads a binary file from a path given as the first CLI…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input file format (big-endian unless noted): - The file consists of a sequence of records. - Each record: type…
The task
**Input file format (big-endian unless noted):** - The file consists of a sequence of records. - Each record: `type` (1 byte) + `length` (variable-length unsigned integer, see below) + `value` (exactly `length` bytes). - The variable-length integer encoding: each byte uses its lower 7 bits for data, and the MSB (bit…
Part of ai-and/termgrade-environments.