             // Converting from zero-based length of the match to the real one.
             len += LZMAConstants.matchMinLen
             if uncompressedSize > -1 && uncompressedSize < len { throw LZMAError.RepeatWillExceed }
-            self.copyMatch(at: rep0 + 1, length: len, &out, &outIndex, &uncompressedSize)
+            self.copyMatch(at: rep0 + 1, length: len, &out, &uncompressedSize)
         }
 
         return out

        }
    }

    func put(_ byte: UInt8, _ out: inout [UInt8], _ outIndex: inout Int,
             _ uncompressedSize: inout Int) {
        self.put(byte)

        if uncompressedSize > 0 {
            out[outIndex] = byte
            outIndex += 1
        } else {
            out.append(byte)
        }
        uncompressedSize -= 1
    }

    func byte(at distance: Int) -> UInt8 {
        return self.byteBuffer[distance <= self.position ? self.position - distance :
            self.dictionarySize - distance + self.position]
    }

    func copyMatch(at distance: Int, length: Int, _ out: inout [UInt8], _ outIndex: inout Int,
                   _ uncompressedSize: inout Int) {
        for _ in 0..<length {
            self.put(self.byte(at: distance), &out, &outIndex, &uncompressedSize)
        }
    }

    func check(distance: Int) -> Bool {
        return distance <= self.position || self.isFull
    }

}

                        // SHORT REP MATCH CASE
                        state = state < 7 ? 9 : 11
                        let byte = self.byte(at: rep0 + 1)
                        self.put(byte, &out, &uncompressedSize)
                        continue
                    }
                } else { // REP MATCH CASE
