4What to require

4.1Reading Bencoded data

Reads and returns a single Bencoded term from the given input-port, or
returns eof if the end-of-file is reached before any other
data appears on the input-port. An error is signalled if a syntax
error or unexpected end-of-file is detected.

If a Bencoded string (Racket bytes) value appears on the input-port
and has length in excess of bencode-bytes-limit’s current
value, an error is signalled.

Reads and
returns as many Bencoded terms as are available on the given input
port. Once end-of-file is reached, returns the terms as a list in the
order they were read from the port. Errors are otherwise signalled as
for bencode-read.