I have hundreds or thousands of integers that I would like to combine in
   such a way that I can figure out the component numbers later. I will know
   how many numbers there are in a series, and the high and low numbers, and I
   can record any other information about the series that would let me
   backtrack. Ideally, the result would fit in an Int64, but I can go higher
   than that if need be.

   Does anyone have a suggestion?

You have some number N of integers, all of them in the range L to H.
You want to combine them into a single "thing" of a small size.  Right?

This means the result is not an array or anything like that, but more
like a MemoryBlock.

The minimum size (in bits) that you'll need to store the object is:

        N * log2(H - L)

So, if N is 1000, H is 10,000 and L is 1,000, you get (about):

        1000 * log2(10000 - 10000) or 13,135.7 bits or 1,642 bytes

Craig

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to