Encode/Compress a list for storing

Jun 22, 2011 at 5:23pm

Encode/Compress a list for storing

Hello,

I just wonder if there is a way to somehow compress a long list to fewer elements for storing at a coll. Is there an algorithm to encode/decode a long list?
Many thanks

Vangelis

#57721
Jun 22, 2011 at 10:03pm

I guess that depends on what your lists might be made up of. Also, is there a reason you don’t want to store them in the [coll] as they are?

Here’s an idea that turns everything into one symbol using [regexp]:

– Pasted Max Patch, click to expand. –
#206878
Jun 23, 2011 at 9:19am

i guess because they are too long.

of course one could merge several numbers into a symbol such as “symbol 12345 54321 99999 77777″.

#206879
Jun 25, 2011 at 12:38am

Hello,

many thanks for your replies. I guess I have to be more precise. I am trying to capture/store data from the Kinect. That means an update of 18 points with three (XYZ) values, 30 times a sec.
I am receiving data as OSC so I turn them to ASCII numbers (atoi) first.
I can use a coll object to store them but playback is slow for an unknown reason to me even if I use metro:1
I got in to GDIF http://gdif.3075338.n2.nabble.com/ (based on FTM)
but for a minute of capture data the size of the file is around 4mb and needs at least 5 min to be loaded back to the algorithm.
Another option is to use a OSC recorder and I ve found one (java) that does not work, again not sure why.
So, I was thinking if there is a way to compress the data before storing in order to produce smaller data sets. I am not sure there is a benefit to turn them to symbols first…is there?
Finally I got into this :http://www.maxobjects.com/?request=compress&operateur=AND&id_format=0&id_plateforme=0&Submit=OK
and tested the a-hglide object and sadam.lzo
with no success (not very informative help files)

Any ideas?
Many thx

#206880
Jun 25, 2011 at 4:12am

Storage of large quantities of numerical data is exactly what Jitter’s for.

Here’s an example of storing and playing back one minute’s worth of 18 xyz coordinates at 30 fps.

– Pasted Max Patch, click to expand. –
#206881
Jun 29, 2011 at 9:48pm

Thanks Christopher. I will try to mod it to store lists of 25 elements and see if that works fast on large amount of data

#206882

You must be logged in to reply to this topic.