         var state = 0
 
         func decodeLiteral(_ state: Int, _ rep0: Int) {
-            let prevByte = outWindow.isEmpty() ? 0 : outWindow.byte(at: 1)
+            let prevByte = outWindow.isEmpty ? 0 : outWindow.byte(at: 1)
+            // TODO: Something is not quite right.
             var symbol = 1
-            var litState = ((outWindow.totalPosition & ((1 << lp.toInt()) - 1)) << lc.toInt()) + (prevByte >> (8 - lc)).toInt()
+            let litState = ((outWindow.totalPosition & ((1 << lp.toInt()) - 1)) << lc.toInt()) + (prevByte >> (8 - lc)).toInt()
             let probsIndex = 0x300 * litState
             if state >= 7 {
                 var matchByte = outWindow.byte(at: rep0 + 1)

                    state -= 6
                }
                uncompressedSize -= 1
            }

        }

                self.isCorrupted = true
                return nil
            }
        }

        func normalize(pointerData: inout DataWithPointer) {
