Reimplement bitstream.

Shine is very fast now, and footprint is very small!