Write a command-line tool /app/decode that reads a binary file from stdin and writes JSON to stdout . The…
Write a command-line tool /app/decode that reads a binary file from stdin and writes JSON to stdout . The…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Binary format specification: - Each record: type varint length varint value bytes - type varint : unsigned…
The task
**Binary format specification:** - Each record: `[type_varint][length_varint][value_bytes]` - `type_varint`: unsigned LEB128 integer (1-5 bytes). Type 0 means **end-of-stream** (no length or value follows; stop processing). Types 1-255 are valid. - `length_varint`: unsigned LEB128 integer (1-5 bytes). Specifies the…
Part of ai-and/termgrade-environments.