Strings (was: Re: are Mnesia tables immutable?)

Christian S chsu79@REDACTED
Wed Jul 5 16:39:22 CEST 2006

On 7/5/06, Robert Virding <robert.virding@REDACTED> wrote:
> I want the SAME binary string out. If term_to_binary detects that my
> list consists of only 8/16/24/32 bit integers and smart-codes that then
> fine, as long as I get it back the same way.

There is a term_to_binary(Term, Options) that allow compressed
external representations.

So on the same path: how about adding different levels of compression?
term_to_binary(Term, {compressed, text}) that perform cdr coding for
various bitlength integers, but avoid zlib compression? Saves some
memory but doesnt make binary_to_term() cost anything. Could
optionally be done automaticly on everything inserted in an ets table.

I dont experience problems with high memory use myself, so what are
people working with that do have real mem consuption problems?

Would it feel crufty to have an ets table around just to be able to
store large amounts of text compactly in memory?

More information about the erlang-questions mailing list