C dump verification code: // Dump given file as hex, dec, float, string... // // gcc -Ofast -ffast-math -m64 -march=sandybridge -funroll-loops -fopenmp -flto -lm c:/bin/hex_dec_bin_dump.c -o c:/bin/hex_dec_bin_dump.exe #include "bpbfct.c" void main(int argc, char *argv[]) { FILE *ifp; // FILE pointers to Output and Input file struct stat statbuf; // STAT function buffer long bread=-1; // Bytes Read int fsize=0; // File size from STAT() uint16_t usbuf[99]; // Unsigned Short BUFfer uint8_t *char_8_ptr; // Bytes to bisect/mutilate short char bitb[254]={ 0 }; // Bit Buffer. Should hold ANY integer char ifn[255]={ 0 }; strcpy(ifn, argv[1]); // Input File Name arg stat(ifn, &statbuf); // Stat the file to get its size fsize=statbuf.st_size; // File size in bytes for .raw (RGB?) file printf("\n%s\nFile %s is %d bytes long\n", argv[0], ifn, fsize); ifp=fopen(ifn, "rb"); // Open input file in binary bread=fread((void *)usbuf, 1, 999, ifp); // Read argued file printf("Read %d Bytes from %s\n", bread, ifn); printf("Int %d, uint16 %hu, hex 0X%04X, float %.4f, binary %s\n", usbuf[0], usbuf[0], usbuf[0], (float)usbuf[0], itoa(usbuf[0], (char *)(&bitb), 2)); char_8_ptr=(uint8_t *) usbuf; // Cast ushort buf to uShortER printf("BAD_PRINT, Show uint16 as chars: %hu != %c%c\n\n", usbuf[0], char_8_ptr[0], char_8_ptr[1]); exit(0); } // End Main().