This trick will work for any number of bits though. You might not want to use 2^64 entries in your table.
And the "trick" given in the answer still depends on a fixed number of input bits, no matter if it's 8, 32, or 10^100.
This trick will work for any number of bits though. You might not want to use 2^64 entries in your table.