If you used small chunks (say, up to four bytes) you could just have a lookup table storing all the indices.
Or - what a genius idea! - we could use Pi itself as a lookup table and use the sequence of n bytes at that position of pi as an implicit lookup table.