title: Initializing malloc'd memory in a way similar to an array literal?
body: <p>Let's say I've calloc'd some memory for myself:</p>
  
  <pre><code>byte *header = calloc(5 + ZHEADERSIZE, sizeof(byte));
  </code></pre>
  
  <p>This gives me an array of 0's. But what if I want to make a custom initialization of the memory? The following code is a fairly detailed initialization for an array literal. Note that it actually contains variables, so I can't just memcpy all of the array over. I'm wondering if I can replicate this style of initialization for a block of memory that is malloc'd out without having to insert them manually.</p>
  
  <pre><code>unsigned char zhead[] =
  {
      0x00, 37, 0, 218, 0xFF,
  
      0x50, 0x4b, 0x03, 0x04,
      0x14,
      0x00,
      0x00, 0x00,
      0x08, 0x00,
      0x08, 0x03,
      0x64, 0x3c,
      0xAA, 0xBB, 0xCC, 0xDD,
      csize, (csize&gt;&gt;8), 0, 0,
      uncsize, (uncsize&gt;&gt;8), 0, 0,
      0x07, 0x00,
      0x00, 0x00,
      'r', '/', 'r', '.', 'z', 'i', 'p'
  };
  </code></pre>