How to write binary data to file in C without implementation-defined behavior? | Hacker News Reader