<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 11 Oct 2012, at 15:23, <a href="mailto:dhkblaszyk@zeelandnet.nl">dhkblaszyk@zeelandnet.nl</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">Thanks, I think everything is clear now. My plan now is to<br>respect default padding and write records in one go to disk. The padding<br>value will be written to the file header so the records can be read back<br>one variable at a time when padding differs, otherwise they will be read<br>back in one go again. This will sure come at a cost, but only if the<br>file is shared between different ABI's (as is the case when sharing<br>between different endianess). The result will be that the data<br>structures will be at default padding internally allways making optimal<br>use of the CPU.<span class="Apple-converted-space"> </span><br><br>So is there a way to get the padding value at runtime?<br></span></span></blockquote></div><br><div>No. You really should write the fields one by one. Yes, it's slower. That's the cost of portability. You can always optimize by first writing them to a buffer and then writing the buffer in one go.</div><div><br></div><div><br></div><div>Jonas</div></body></html>