39 Commits
Author SHA1 Message Date
nekonyaandTimofey Solomko 735795a7e1 [7-Zip] Fix LZMA dictionary size parsing
The LZMA dictionary size was being read from only 3 bytes (indices 1-3)
instead of the full 4 bytes (indices 1-4) specified in the LZMA format.

This caused decompression to fail with LZMAError.notEnoughToRepeat for
archives using dictionary sizes >= 16MB (e.g., LZMA:24 = 2^24 = 16MB),
because the high byte was not read and the dictionary size defaulted
to the minimum 4096 bytes.

Change: `for i in 1..<4` → `for i in 1..<5`
2026-05-14 21:31:30 +08:00
Timofey Solomko 1566b49ce3 [7-Zip][ZIP] Remove support for CocoaPods optional dependencies 2026-02-03 01:15:33 +08:00
Timofey Solomko ea9aaccfb9 Update copyright year to 2026 2026-01-31 15:30:24 +08:00
Timofey Solomko ed66991cbd Update copyright year to 2024 2024-01-11 16:57:04 +03:00
Timofey Solomko 43132fc39d Update copyright year to 2023 2023-02-07 15:31:45 +02:00
Timofey Solomko 79295db930 Update copyright year to 2022 2022-01-08 15:02:59 +03:00
Timofey Solomko 6cdfc14f54 [7-Zip] Add support for LZ4 2021-10-16 21:57:46 +03:00
Timofey Solomko e83f23effa Update copyright year to 2021 2021-01-11 11:20:57 +02:00
Timofey Solomko 31ec1f1553 Update copyright year to 2020 2020-01-01 19:06:33 +03:00
Timofey Solomko 75b21ae107 Replace usage of ByteReader with LittleEndianByteReader 2019-05-01 19:34:30 +03:00
Timofey Solomko ce47019097 Update copyright year to 2019 2019-01-02 23:15:43 +03:00
Timofey Solomko b9984ac349 [7-Zip] Enable support for delta filter 2018-08-29 10:55:18 +03:00
Timofey Solomko d685b4f531 [LZMA2] Internal decompress function now returns Data instead of byte array 2018-08-28 11:41:38 +03:00
Timofey Solomko 4e6d3beea9 [LZMA] Replace LZMAProperties.updateProperties with init from lzma byte and dict size 2018-08-28 11:34:04 +03:00
Timofey Solomko e36e0bf4d8 [7-Zip] Use new LZMA decompress function instead of LZMADecoder directly 2018-08-28 11:34:04 +03:00
Timofey Solomko 4713ad5ed8 [LZMA2] Use LZMA2.decompress with dict size byte argument function instead of using LZMA2Decoder directly in "clients" 2018-08-22 10:40:16 +03:00
Timofey Solomko e11f4d4896 [LZMA2] Merge LZMA2Decoder initializer and its setDictionarySize function 2018-08-22 10:40:16 +03:00
Timofey Solomko b52a55d54d [LZMA] Replace references to properties of LZMADecoder with references to LZMAProperties property of decoder 2018-08-22 10:38:53 +03:00
Timofey Solomko 062109d947 [LZMA] Reset decoder state inside LZMADecoder.setProperties
This removes additional requirement to call resetStateAndDecoders after calling setProperties.
2018-08-13 20:30:24 +03:00
Timofey Solomko 6cfdc0ab29 [LZMA] Rename LZMADecoder.dictionarySize to dictSize 2018-05-20 12:55:46 +03:00
Timofey Solomko 58c854d72b [7-Zip] Improve style of guard statements 2018-05-20 12:04:44 +03:00
Timofey Solomko a0ef7a3cfe Swiftlinted 2018-04-10 23:22:31 +03:00
Timofey Solomko 311fe5ae80 [7-Zip] Add property to SevenZipFolder orderedCompressionMethods
It lazily returns compression methods in the order used by folder.
2018-03-18 15:47:43 +03:00
Timofey Solomko 44f33bf02a Make bit reader and writer functions' parameters concrete classes
Previously, it was almost always protocols, which in some cases didn't make sense.
2018-01-07 22:27:36 +03:00
Timofey Solomko e714dc308b Updated copyright year to 2018 2018-01-03 19:44:18 +03:00
Timofey Solomko c8d92e56d3 Replace BitReader and ByteReader with BitByteData's implementations 2018-01-03 19:22:15 +03:00
Timofey Solomko 20ab480737 Complete renaming of DataWithPointer to ByteReader
This includes renaming pointerData variables to byteReader as well as renaming of files with extensions to ByteReader.
2018-01-03 19:22:14 +03:00
Timofey Solomko 3751e25c4f Rename DataWithPointer to ByteReader
This and following commits should ease switch to BitByteData usage.
2018-01-03 19:22:13 +03:00
Timofey Solomko 88bf2ee0bb Swiftlint autocorrect 2017-11-11 13:31:10 +03:00
Timofey Solomko f181bd6e3d Remove throws keyword from LZMA decoders inits 2017-11-11 13:10:35 +03:00
Timofey Solomko d18a295d39 Remove LZMA2Error.wrongProperties in favor of wrongDictionarySize 2017-11-10 22:26:52 +03:00
Timofey Solomko dd7f4b2fc8 Add isEncryptionMethod property to 7zCoder and use it in 7zFolder 2017-11-09 19:39:34 +03:00
Timofey Solomko 5851d7daf8 Rewrite decoding part of 7z using new compressionMethod property 2017-11-09 19:36:59 +03:00
Timofey Solomko c445e09c92 Rename LZMATempDecoder into LZMADecoder 2017-10-29 12:54:35 +03:00
Timofey Solomko 0b96b8cf50 Update 7-zip to use new LZMA2 decoder 2017-10-29 12:51:29 +03:00
Timofey Solomko bca275f3aa Remove label from the argument of setProperties function 2017-10-29 12:37:28 +03:00
Timofey Solomko b1ff03def7 Use new LZMA decoder in 7-zip 2017-10-29 12:14:10 +03:00
Timofey Solomko 9e02a88391 Reduce usage of for-where clause
Sometimes it is inappropriate and single if is more logical.
2017-10-07 13:09:55 +03:00
Timofey Solomko 843896edcf Move source code files into subfolders 2017-10-06 23:10:01 +03:00