Re: [linux-audio-dev] storing floats in ascii format

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] storing floats in ascii format
From: Jörn Nettingsmeier (nettings_AT_folkwang-hochschule.de)
Date: Thu May 16 2002 - 17:23:28 EEST


Maarten de Boer wrote:
>
> Hello,
>
> Storing large arrays of floats in XML files is very
> unefficient when it comes to space. Where in a binary
> format each float would contain only 4 bytes, in a
> ASCII format this number much bigger.
>
> A simple solution would be to store the values as
> binary inside the XML. It is too bad XML does not
> have a way to do this.. The binary format will
> contain \0's, and certainly most XML parsers will
> choke on those.
>
> So, I was thinking to use binhex, or something similar,
> encoding the 32 bits in 7 bit values in the ascii
> character range. Thus, each float would take 5 bytes.
>
> However, maybe a more compact encoding is also possible,
> using some variable length encoding.
>
> Does anybody have experience with this, or pointers to
> implementations? Or any suggestion at all?

the thing i like about xml is it's human-readable.
doing binary in xml combines all the bloat of the former with the
ugliness of the latter...

do you expect to have such masses of float data that size will become an
issue ?


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu May 16 2002 - 19:07:17 EEST