I need to extract the integers contained in a binary file. The format of the file first specifies how many bytes (1..8) are used to represent each integer (in big-endian). I then use
to get the specified bytes into a variable. But how can I
the bytes properly so they are interpreted as a number? I have already read through
and could only find a solution for integers of size 1, 2, 4, and 8 bytes.