[7-Zip] Add support for LZ4

This commit is contained in:
Timofey Solomko
2021-10-16 21:57:46 +03:00
parent c44901547c
commit 6cdfc14f54
+6
View File
@@ -186,6 +186,12 @@ class SevenZipFolder {
else { throw SevenZipError.internalStructureError }
decodedData = DeltaFilter.decode(LittleEndianByteReader(data: decodedData), (properties[0] &+ 1).toInt())
} else if coder.id == [0x04, 0xF7, 0x11, 0x04] {
#if (!SWCOMPRESSION_POD_SEVENZIP) || (SWCOMPRESSION_POD_SEVENZIP && SWCOMPRESSION_POD_LZ4)
decodedData = try LZ4.decompress(data: decodedData)
#else
throw SevenZipError.compressionNotSupported
#endif
} else if coder.isEncryptionMethod {
throw SevenZipError.encryptionNotSupported
} else {