Write a command-line tool /app/decoder that reads a binary file from a path given as the first argument…
Write a command-line tool /app/decoder that reads a binary file from a path given as the first argument…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Binary format: - The file consists of zero or more records back-to-back until EOF. - Each record is: 1 byte tag…
The task
**Binary format:** - The file consists of zero or more records back-to-back until EOF. - Each record is: 1 byte tag (unsigned 8-bit integer) | varint-encoded length | value bytes (exactly `length` bytes). Tag 0x00 is illegal and must cause the program to exit with code 1 and print nothing to stdout. - Varint…
Part of ai-and/termgrade-environments.