Sorry I meant to say what size of integer you require, 8,16,32,64bit?
32-bit for now. I don't anticipate them going to 64-bit so soon.
Considering you are storing only millions of rows I figured a mysql implementation using blobs should do the trick .. but it all depends on the load you expect .. worth playing around with the idea I think.