XDelta Compression Format

The XINA Delta (xd) compression format is a simple, high performance format for compression and decompression of a list of numeric values into a string. The compression is most efficient for data sets with frequently repeated values, or predictable value iterations.

The format consists of a few main features:

The configuration of the encoding of a particular string is denoted by a comma delimited set of steps. These are:

This is followed by a colon, and the encoded data.

For example, given the array of numbers:

1, 1, 1, 1, 2, 3, 4, 4, 4, 3, 2, 1, 0, 0, 0

One possible encoding would be:

"d,b0:1,,n2,1,n2,,,-1,n3,,"

Breaking this down:

Dec Enc
1 1
1 blank = d0 = 1+0 = 1
1 n2 = previous value twice = d0 = 1+0 = 1
1 "
2 1 = d1 = 1+1 = 2
3 n2 = previous value twice = d1 = 2+1 = 3
4 " = d1 = 3+1 = 4
4 blank = d0 = 4+0 = 4
4 blank = d0 = 4+0 = 4
3 -1 = d-1 = 4-1 = 3
2 n3 = previous value thrice = d-1 = 3-1 = 2
1 " = d-1 = 2-1 = 1
0 " = d-1 = 1-1 = 0
0 blank = d0 = 0+0 = 0
0 blank = d0 = 0+0 = 0

Revision #2
Created 11 February 2026 20:09:19 by Nick Dobson
Updated 11 February 2026 21:37:25 by Nick Dobson