[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] s11n egg and compactness

From: Tony Sidaway
Subject: [Chicken-hackers] s11n egg and compactness
Date: Thu, 3 Dec 2009 00:59:02 +0000

The current version of s11n, the serialization egg, emphasizes
simplicity over compactness.  Typically every item of data is preceded
by a data type tag and there are so few data types that easily
compressible data is often expressed in a very redundant form.

It would be possible to improve the packing ratio substantially by
adopting data type tags for (at least) the following cases:

The popular whole number values 0, +1 and -1
Byte vectors (strings) that can be represented as C strings (that is,
they contain no internal zero bytes, and so can reliably be
represented as an arbitrary sequence of bytes terminated by a zero
Byte vectors whose length can be represented by a single unsigned byte.
Short integers: int8s, int8u, int16s, int16u

Changes like this could be adopted easily without the risk of making
existing serialized data unreadable.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]