<div dir='auto'><div><div class="gmail_extra"><div class="gmail_quote">On 2 Mar 2018 11:30 a.m., Ben Boeckel <ben.boeckel@kitware.com> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">On Fri, Mar 02, 2018 at 11:05:24 +1300, Todd via vtk-developers wrote:
<br>
> Can this not be simply achieved by base64 encoding the value as bytes and
<br>
> saving as a string? Isn't a float always 10 bytes?
<br>
>
<br>
> It is more verbose, but there would be no loss of precision. It looks like VTK
<br>
> already has base64 utilities, so another library would not be needed.
<br>
<br>
There is also the hexfloat format, but that has endian-ness issues, same
<br>
as any other binary-in-ascii output. It is also likely to make files
<br>
backwards-incompatible (older releases don't know how to read a hexfloat
<br>
or base64-encoded float)<br></p></blockquote></div></div></div><div dir="auto">I think the trick would be to choose either big or small endianess and always save the values that way; then handle the conversion depending on the system.</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">
<br>
--Ben
<br>
</p>
</blockquote></div><br></div></div></div>