title: struct.pack longer than its parts?
body: <p>I want to unpack 6 values: 2 * <code>UInt16</code>, 1 * <code>UInt32</code>, 1 * <code>UInt16</code>, 2 * <code>Int64</code></p>
  
  <p>Adding the size in bytes up, I get 26.</p>
  
  <p>But python seems to think it should be 32:</p>
  
  <pre><code>&gt;&gt;&gt; a = struct.pack("H",0)
  &gt;&gt;&gt; len(a)
  2 &lt;-- correct
  &gt;&gt;&gt; a = struct.pack("L",0)
  &gt;&gt;&gt; len(a)
  4 &lt;-- correct
  &gt;&gt;&gt; a = struct.pack("q",0)
  &gt;&gt;&gt; len(a)
  8 &lt;-- correct
  &gt;&gt;&gt; a = struct.pack("HHLHqq",0,0,0,0,0,0)
  &gt;&gt;&gt; len(a)
  32 &lt; -- should be 2 + 2 + 4 + 2 + 8 + 8 = 26 
  &gt;&gt;&gt; a = struct.pack("HHLHq",0,0,0,0,0)
  &gt;&gt;&gt; len(a)
  24 &lt; -- should be 2 + 2 + 4 + 2 + 8 = 18
  &gt;&gt;&gt; a = struct.pack("HHLH",0,0,0,0)
  &gt;&gt;&gt; len(a)
  10 &lt;-- correct again
  </code></pre>
  
  <p><code>struct.unpack</code> has the same problem and requires 32 byte to unpack "HHLHqq". However, in my application the data gets send from an external source and it's just 26 bytes.</p>
  
  <p>I could unpack it one by one as a workaround, but there must be a way to disable this padding for sure?</p>