in reply to Re: Perl Drag Racing - sum/delta list
in thread Perl Drag Racing - sum/delta list
The total size of a packet is already known. (thus the total size). If this is a concatenation of subpackets, we need to know where to separate them back out. Instead of putting the length of the subpacket before each, it offers better compression to put this "index" data elsewhere and not "contaminate" the data with values that are not in its normal range. Also, there is an elegance factor of uniformity about putting this index in its own field, not mixed throughout.
So, how to store the index? The delta-from-previous is smaller than a simple list of lengths, because it can use a shorter encoding form if the sizes are similar. But since the total size is already known, we only need the deltas of all except one, and can leave out one value.
—John
|
|---|