A new attempt has been made to make an LZMADecoder initializer which can support both LZMA and LZMA2. Also lzma Constants are no longer a substruct.

This commit is contained in:
Timofey Solomko
2016-12-23 20:09:46 +03:00
parent ec8f15965a
commit 4bb92c00d5
4 changed files with 93 additions and 75 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ final class LZMABitTreeDecoder {
init(numBits: Int, _ pointerData: inout DataWithPointer) {
self.pointerData = pointerData
self.probs = Array(repeating: LZMADecoder.Constants.probInitValue,
self.probs = Array(repeating: LZMAConstants.probInitValue,
count: 1 << numBits)
self.numBits = numBits
}