                 self.isCorrupted = true
                 return nil
             }
-        }
-
-        func isFinishedOK() -> Bool {
-            return self.code == 0
         }
 
         func normalize(pointerData: inout DataWithPointer) {

        var state = 0

        func decodeLiteral(_ state: Int, _ rep0: Int) {
            let prevByte = outWindow.isEmpty() ? 0 : outWindow.byte(at: 1)
            var symbol = 1
            var 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)

            return distance <= self.position || self.isFull
        }

    }

    final class RangeDecoder {
