| 12 | |

| 13 | == Shift Operations == |

| 14 | |

| 15 | * {{{pablo.Advance(strm, shft)}}} - shift the bit stream {{{strm}}} forward {{{shft}}} positions |

| 16 | |

| 17 | * {{{pablo.Lookahead(strm, shft)}}} - shift the bit stream {{{strm}}} backward {{{shft}}} positions |

| 18 | |

| 19 | * {{{pablo.Advance(strm, idx, shft)}}} - shift bits in {{{strm}}} selected by the index stream {{{idx}}} forward by {{{shft}}} index positions |

| 20 | ** Consider {{{x = pablo.Advance(strm, idx, shft}}} |

| 21 | ** {{{x}}}[k] = 1, if and only if {{{idx}}}[k] = 1, k is the position of the nth 1 bit in {{{idx}}}, j is the position of the (n-shft)th 1 bit in {{{idx}}}, and {{{strm}}}[j] = 1. |

| 22 | |