title: Changing array shape in a compound type
body: <p>I'm starting from a struct </p>
  
  <pre><code>typedef struct SpikeInfo {
          uint64 timestamp;
          int recording;
          int16 waveform[MAX_TRANSFORM_SIZE];
      } SpikeInfo;
  </code></pre>
  
  <p>and then I create a HDF5 compound datatype:</p>
  
  <pre><code>CompType spiketype(sizeof(SpikeInfo));
  hsize_t dims[2] = {MAX_TRANSFORM_SIZE/nChannels, nChannels};
  spiketype.insertMember(H5std_string("waveform"), HOFFSET(SpikeInfo, waveform), ArrayType(getNativeType(I16), 2, dims));
  spiketype.insertMember(H5std_string("recording"), HOFFSET(SpikeInfo, recording), getNativeType(U16));
  spiketype.insertMember(H5std_string("timestamp"), HOFFSET(SpikeInfo, timestamp), getNativeType(U64));
  </code></pre>
  
  <p>Thus the array has allocated <code>MAX_TRANSFORM_SIZE/nChannels</code> rows. However, it's most likely that I will be constantly receiving less data (for example with the number of rows being  onlyhalf of <code>MAX_TRANSFORM_SIZE/nChannels</code>), and then I end up having to fill the rest with zeros, which unnecessarily increases the filesize. I was wondering if there's a way to make that <code>ArrayType</code> resizable, so that I can make it bigger if it's necessary, but it's small at first.</p>
  
  <p>I know there is a type VarLenType, but the documentation doesn't show any useful methods for it. Is such a thing possible at all?</p>