C code reads binary data in correctly.