             throw LZMAError.RangeDecoderError
         }
 
-        let literalProbs = Array(repeating: Constants.probInitValue, count: 0x300 << (lc + lp).toInt())
-        let isMatch = Array(repeating: Constants.probInitValue,
+        var literalProbs = Array(repeating: Constants.probInitValue, count: 0x300 << (lc + lp).toInt())
+        var isMatch = Array(repeating: Constants.probInitValue,
                             count: Constants.numStates << Constants.numPosBitsMax)
-        let isRep = Array(repeating: Constants.probInitValue, count: Constants.numStates)
-        let isRepG0 = Array(repeating: Constants.probInitValue, count: Constants.numStates)
-        let isRepG1 = Array(repeating: Constants.probInitValue, count: Constants.numStates)
-        let isRepG2 = Array(repeating: Constants.probInitValue, count: Constants.numStates)
-        let isRep0Long = Array(repeating: Constants.probInitValue,
+        var isRep = Array(repeating: Constants.probInitValue, count: Constants.numStates)
+        var isRepG0 = Array(repeating: Constants.probInitValue, count: Constants.numStates)
+        var isRepG1 = Array(repeating: Constants.probInitValue, count: Constants.numStates)
+        var isRepG2 = Array(repeating: Constants.probInitValue, count: Constants.numStates)
+        var isRep0Long = Array(repeating: Constants.probInitValue,
                                count: Constants.numStates << Constants.numPosBitsMax)
 
-        let posSlotDecoder = Array(repeating: BitTreeDecoder(numBits: 6), count: Constants.numLenToPosStates)
-        let alignDecoder = BitTreeDecoder(numBits: Constants.numAlignBits)
-        let posDecoders = Array(repeating: Constants.probInitValue, count: 1 + Constants.numFullDistances - Constants.endPosModelIndex)
-
-        let lenDecoder = LenDecoder()
-        let repLenDecoder = LenDecoder()
+        var posSlotDecoder = Array(repeating: BitTreeDecoder(numBits: 6), count: Constants.numLenToPosStates)
+        var alignDecoder = BitTreeDecoder(numBits: Constants.numAlignBits)
+        var posDecoders = Array(repeating: Constants.probInitValue, count: 1 + Constants.numFullDistances - Constants.endPosModelIndex)
+
+        var lenDecoder = LenDecoder()
+        var repLenDecoder = LenDecoder()
 
         var rep0 = 0
         var rep1 = 0

        var rep3 = 0
        var state = 0

        return Data(bytes: out)
    }
    


        /// An array for storing output data
        var out: [UInt8] = uncompressedSize == -1 ? [] : Array(repeating: 0, count: uncompressedSize)
        var outIndex = uncompressedSize == -1 ? -1 : 0

        print("uncompressedSize: \(uncompressedSize)")

