read_bin
result = read_bin(f, n)
Input: f, n · Output: result
What it is
Reads up to n (a number) raw bytes from f (file handle, opened readable). A partial read is not an error — hitting the end partway gives however many bytes were there, which is what makes a "drain this file in chunks" loop composable without an eof check each time round.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = read_bin(f, n) | f numbernot documented yetn numbernot documented yet | result Vec or number | Returns a Vec of numbers 0-255, or Nothing only when no bytes remain at all. |
Examples
No documentation example calls this form yet. The File I/O chapter is where one belongs.