                 }
                 // END.
 
-                // Check if finished marker is encoutered.
+                // Check if finish marker is encoutered.
                 if rep0 == 0xFFFFFFFF {
                     if rangeDecoder.isFinishedOK {
                         break

                 - `lp` low bits from current position in output.
                */
                let litState = ((outWindow.totalPosition & ((1 << lp.toInt()) - 1)) << lc.toInt()) + (prevByte >> (8 - lc)).toInt()
                /// Selected table for literal decoding.
                var probs = literalProbs[litState]
                // If state is greater than 7 we need to do additional decoding with 'matchByte'.
                if state >= 7 {
                    /**

                // Finally, we need to update `state`.
                if state < 4 {
                    state = 0
                } else if state < 10 {
                    state -= 3
                } else {
                    state -= 6
