Thanks for the suggestions everyone!
Using Base16, Base64, or even simple decimal-as-text would all be a
possibility. But each requires more than eight bytes of storage. With tens to
hundreds of thousands of addresses being stored, I just don't want to accept
the larger file size. Each of these also, while supporting the conditional
operators properly, would not support the arithmetic operators.
My offset scheme actually works fine with conditionals by themselves. Its the
arithmetic operators that are problematic - as with the various text encodings.
I only really require the addition of two addresses. So after poking around the
SQLite web site some more, and thinking about the suggestions thus-far, I'm
leaning towards leaving my original offset scheme in place.
On top of this, I believe I could create a user-defined function for adding two
addresses. It looks like from the Version 3 API web page, I can define
something like addAddress(x, y) that would receive two 64-bit signed integers
as input and could produce a 64-bit signed integer as output. Then the example
I just sent to Ted would read:
WHERE ?1 >= addAddress(base, begin) AND ?1 < addAddress(base, end);
Seem reasonable?
-- William Hachfeld