Often, when parsing different document formats, it can be useful to read specific objects from streams, so convenience functions exist for this too. Firstly, integers of different size and endianness are catered for:
We have functions to read both C style strings, and newline/return terminated lines: