[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: [linux-audio-dev] storing floats in ascii format
From: Maarten de Boer (mdeboer_AT_iua.upf.es)
Date: Thu May 16 2002 - 16:41:47 EEST


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?

Maarten


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 - 16:37:50 EEST