Embedding Binary Objects in C
My favorite is simply using a tool to create a C file with your binary data:<p><pre><code>  static uint8_t mydata[] = {0xDE, 0xAD, 0xBE, 0xEF, ... };
</code></pre>
The advantage is that it works anywhere, with any compiler.<p>The disadvantage is that it can increase compile time. I would limit each .c file to 10MB; it seems there's a quadratic increase in build time with file size, at least with gcc.<p>Also, instead of "0x%02x" I use decimal notation and no spaces in order to decrease the .c file size:<p><pre><code>  static uint8_t mydata[] = {
  42,7,105,0,0,...,
  8,0,1,20,...,
  ...,
  };</code></pre>