Write a CLI tool /app/decode that reads a binary file of type-length-value (TLV) records and outputs a JSON…
Write a CLI tool /app/decode that reads a binary file of type-length-value (TLV) records and outputs a JSON…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input file format: - A stream of TLV records, each consisting of: - type : a varint-encoded unsigned…
The task
**Input file format:** - A stream of TLV records, each consisting of: - `type`: a varint-encoded unsigned integer - `length`: a varint-encoded unsigned integer (number of bytes in the value) - `value`: exactly `length` raw bytes - The file may be empty (0 bytes), producing an empty JSON array `[]`. - Records are read…
Part of ai-and/termgrade-environments.