00:00:00.000 Split a variable shift into distances one, two and four Shift the byte right by three. The low two amount bits are high, enabling a shift of one and then two. The four-bit shift stage bypasses the data. 00:00:13.750 Test zero, seven, and out-of-range distances Distance zero passes the byte through. A shift of seven moves the original top bit into the lowest position. At eight or more, every original bit has shifted out. 00:00:28.708 Give each stage its own amount bit Each stage selects between a shift and a bypass. The low three control bits combine to make distances from zero through seven. The fourth bit forces the result to zero. 00:00:43.667 Keep the amount bit that represents out-of-range shifts Eight and zero have the same low three bits. Dropping the top bit would turn a shift by eight into a bypass. Test both control values to catch that error.