| Section | Title |
|---|---|
| 1 | Files |
| 2 | Reading Bytes |
| 3 | Writing Bytes |
| 4 | Buffered I/O |
| 5 | Standard Input and Output |
| 6 | Error Handling in I/O |
| 7 | Zig 0.16 I/O Changes |
| 8 | Exercises |
FilesMost programs spend their time moving bytes.
Reading BytesA file is read as bytes.
Writing BytesWriting bytes is the opposite of reading them.
Buffered I/OReading or writing one byte at a time is expensive.
Standard Input and OutputA program usually has three standard streams:
Error Handling in I/OInput and output can fail.
Zig 0.16 I/O ChangesZig 0.16 changes how I/O code is written in the standard library.
ExercisesThis section collects the exercises for the chapter.