Re: Encoding/decoding ranges of unsigned integers...
- From: d|dq <digital_don_quijote@xxxxxxxxx>
- Date: Thu, 18 Aug 2005 15:29:20 -0700
John Reiser wrote:
d|dq wrote:
There could be millions of ranges. Sorting them would take too long. (too long = longer than acceptable in a soft real-time system)
The minimum value would be 0. The maximum value would be the greatest value you can store in an unsigned 64-bit integer. (as stated by C99)
The distribution of the ranges is undetermined [but] At time t1,
if you were to sort the ranges from left to right ([2,9] < [10,11] < etc.),
you would find the density of ranges is higher on the left side of the sorted sequence.
Choose a batch size of (say) 100 ranges, or the ranges that arrive in the next fixed-in-advance interval of time (say, 0.1 second.) Sort the batch. Encode the minimum left endpoint, the differences (in order) between consecutive left endpoints, and the lengths (in order) of the ranges. Take advantage of anything else that might be discovered about the distribution of the two sequences of deltas (distance between consecutive left endpoints; consecutive lengths.) The statement of the problem promises very little, so it may be unlikely to improve upon an ordinary entropy encoder.
In other words, I might as well use a general purpose encoder, right?
Are you familiar with LZO? (http://www.oberhumer.com/opensource/lzo/)
Will I save time if I simply use a library of this kind? .
- References:
- Encoding/decoding ranges of unsigned integers...
- From: d|dq
- Re: Encoding/decoding ranges of unsigned integers...
- From: Willem
- Re: Encoding/decoding ranges of unsigned integers...
- From: d|dq
- Re: Encoding/decoding ranges of unsigned integers...
- From: John Reiser
- Encoding/decoding ranges of unsigned integers...
- Prev by Date: Re: gzip file ftp'ed as ascii...
- Next by Date: Re: Zlib: how to have a header and compressed data
- Previous by thread: Re: Encoding/decoding ranges of unsigned integers...
- Next by thread: Re: Encoding/decoding ranges of unsigned integers...
- Index(es):