summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libs/7zip/7zip.pri4
-rw-r--r--src/libs/7zip/unix/C/7zBuf.h39
-rw-r--r--src/libs/7zip/unix/C/7zBuf2.c45
-rw-r--r--src/libs/7zip/unix/C/7zCrc.c76
-rw-r--r--src/libs/7zip/unix/C/7zCrc.h25
-rw-r--r--src/libs/7zip/unix/C/7zCrcOpt.c34
-rw-r--r--src/libs/7zip/unix/C/7zCrcT8.c43
-rw-r--r--src/libs/7zip/unix/C/7zStream.c169
-rw-r--r--src/libs/7zip/unix/C/7zVersion.h7
-rw-r--r--src/libs/7zip/unix/C/Aes.c284
-rw-r--r--src/libs/7zip/unix/C/Aes.h38
-rw-r--r--src/libs/7zip/unix/C/Alloc.c280
-rw-r--r--src/libs/7zip/unix/C/Alloc.h27
-rw-r--r--src/libs/7zip/unix/C/Bra.c133
-rw-r--r--src/libs/7zip/unix/C/Bra.h68
-rw-r--r--src/libs/7zip/unix/C/Bra86.c85
-rw-r--r--src/libs/7zip/unix/C/BraIA64.c67
-rw-r--r--src/libs/7zip/unix/C/BwtSort.c516
-rw-r--r--src/libs/7zip/unix/C/BwtSort.h30
-rw-r--r--src/libs/7zip/unix/C/CpuArch.c168
-rw-r--r--src/libs/7zip/unix/C/CpuArch.h155
-rw-r--r--src/libs/7zip/unix/C/Delta.c62
-rw-r--r--src/libs/7zip/unix/C/Delta.h23
-rw-r--r--src/libs/7zip/unix/C/HuffEnc.c146
-rw-r--r--src/libs/7zip/unix/C/HuffEnc.h27
-rw-r--r--src/libs/7zip/unix/C/LzFind.c761
-rw-r--r--src/libs/7zip/unix/C/LzFind.h115
-rw-r--r--src/libs/7zip/unix/C/LzFindMt.c793
-rw-r--r--src/libs/7zip/unix/C/LzFindMt.h105
-rw-r--r--src/libs/7zip/unix/C/LzHash.h54
-rw-r--r--src/libs/7zip/unix/C/Lzma2Dec.c356
-rw-r--r--src/libs/7zip/unix/C/Lzma2Dec.h84
-rw-r--r--src/libs/7zip/unix/C/Lzma2Enc.c477
-rw-r--r--src/libs/7zip/unix/C/Lzma2Enc.h66
-rw-r--r--src/libs/7zip/unix/C/LzmaDec.c999
-rw-r--r--src/libs/7zip/unix/C/LzmaDec.h231
-rw-r--r--src/libs/7zip/unix/C/LzmaEnc.c2268
-rw-r--r--src/libs/7zip/unix/C/LzmaEnc.h80
-rw-r--r--src/libs/7zip/unix/C/LzmaUtil/Lzma86Dec.c61
-rw-r--r--src/libs/7zip/unix/C/LzmaUtil/Lzma86Dec.h51
-rw-r--r--src/libs/7zip/unix/C/LzmaUtil/Lzma86Enc.c113
-rw-r--r--src/libs/7zip/unix/C/LzmaUtil/Lzma86Enc.h78
-rw-r--r--src/libs/7zip/unix/C/MtCoder.c327
-rw-r--r--src/libs/7zip/unix/C/MtCoder.h98
-rw-r--r--src/libs/7zip/unix/C/Ppmd.h85
-rw-r--r--src/libs/7zip/unix/C/Ppmd7.c708
-rw-r--r--src/libs/7zip/unix/C/Ppmd7.h140
-rw-r--r--src/libs/7zip/unix/C/Ppmd7Dec.c187
-rw-r--r--src/libs/7zip/unix/C/Ppmd7Enc.c185
-rw-r--r--src/libs/7zip/unix/C/Ppmd8.c1120
-rw-r--r--src/libs/7zip/unix/C/Ppmd8.h133
-rw-r--r--src/libs/7zip/unix/C/Ppmd8Dec.c155
-rw-r--r--src/libs/7zip/unix/C/Ppmd8Enc.c161
-rw-r--r--src/libs/7zip/unix/C/RotateDefs.h20
-rw-r--r--src/libs/7zip/unix/C/Sha256.c204
-rw-r--r--src/libs/7zip/unix/C/Sha256.h26
-rw-r--r--src/libs/7zip/unix/C/Sort.c93
-rw-r--r--src/libs/7zip/unix/C/Sort.h20
-rw-r--r--src/libs/7zip/unix/C/Threads.c582
-rw-r--r--src/libs/7zip/unix/C/Threads.h123
-rw-r--r--src/libs/7zip/unix/C/Types.h254
-rw-r--r--src/libs/7zip/unix/C/Xz.c88
-rw-r--r--src/libs/7zip/unix/C/Xz.h252
-rw-r--r--src/libs/7zip/unix/C/XzCrc64.c33
-rw-r--r--src/libs/7zip/unix/C/XzCrc64.h26
-rw-r--r--src/libs/7zip/unix/C/XzDec.c875
-rw-r--r--src/libs/7zip/unix/C/XzEnc.c497
-rw-r--r--src/libs/7zip/unix/C/XzEnc.h25
-rw-r--r--src/libs/7zip/unix/C/XzIn.c306
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zCompressionMode.cpp3
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zCompressionMode.h50
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zDecode.cpp332
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zDecode.h68
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zEncode.cpp444
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zEncode.h55
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zExtract.cpp270
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zFolderInStream.cpp123
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zFolderInStream.h58
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zFolderOutStream.cpp149
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zFolderOutStream.h58
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zHandler.cpp482
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zHandler.h119
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zHandlerOut.cpp483
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zHeader.cpp14
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zHeader.h97
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zIn.cpp1276
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zIn.h245
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zItem.h268
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zOut.cpp866
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zOut.h152
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zProperties.cpp164
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zProperties.h22
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zRegister.cpp18
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zSpecStream.cpp24
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zSpecStream.h35
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zUpdate.cpp1216
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zUpdate.h88
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/ApmHandler.cpp356
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/ArchiveExports.cpp135
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/ArjHandler.cpp798
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Bz2Handler.cpp423
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Cab/CabBlockInStream.cpp189
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Cab/CabBlockInStream.h44
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Cab/CabHandler.cpp929
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Cab/CabHandler.h28
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Cab/CabHeader.cpp15
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Cab/CabHeader.h44
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Cab/CabIn.cpp272
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Cab/CabIn.h161
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Cab/CabItem.h63
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Cab/CabRegister.cpp13
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Chm/ChmHandler.cpp721
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Chm/ChmHandler.h29
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Chm/ChmHeader.cpp24
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Chm/ChmHeader.h28
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Chm/ChmIn.cpp937
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Chm/ChmIn.h244
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Chm/ChmRegister.cpp13
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Com/ComHandler.cpp239
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Com/ComHandler.h28
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Com/ComIn.cpp389
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Com/ComIn.h119
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Com/ComRegister.cpp13
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/CoderMixer2.cpp121
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/CoderMixer2.h174
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/CoderMixer2MT.cpp240
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/CoderMixer2MT.h80
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/CoderMixer2ST.cpp239
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/CoderMixer2ST.h88
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/CrossThreadProgress.cpp15
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/CrossThreadProgress.h37
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/DummyOutStream.cpp22
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/DummyOutStream.h24
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/FindSignature.cpp62
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/FindSignature.h12
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/HandlerOut.cpp623
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/HandlerOut.h87
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/InStreamWithCRC.cpp42
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/InStreamWithCRC.h67
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/ItemNameUtils.cpp61
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/ItemNameUtils.h24
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/MultiStream.cpp190
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/MultiStream.h84
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp18
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/OutStreamWithCRC.h36
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/OutStreamWithSha1.cpp18
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/OutStreamWithSha1.h36
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/ParseProperties.cpp177
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/ParseProperties.h18
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/CpioHandler.cpp624
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/CramfsHandler.cpp644
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/DebHandler.cpp413
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/DeflateProps.cpp118
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/DeflateProps.h35
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/DllExports2.cpp76
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/DmgHandler.cpp918
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/ElfHandler.cpp534
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/FatHandler.cpp996
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/FlvHandler.cpp544
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/GzHandler.cpp698
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Hfs/HfsHandler.cpp243
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Hfs/HfsHandler.h26
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Hfs/HfsIn.cpp480
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Hfs/HfsIn.h154
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Hfs/HfsRegister.cpp13
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/IArchive.h234
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Iso/IsoHandler.cpp326
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Iso/IsoHandler.h30
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Iso/IsoHeader.cpp21
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Iso/IsoHeader.h61
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Iso/IsoIn.cpp453
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Iso/IsoIn.h315
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Iso/IsoItem.h141
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Iso/IsoRegister.cpp13
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/LzhHandler.cpp775
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/LzmaHandler.cpp430
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/MachoHandler.cpp500
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/MbrHandler.cpp507
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/MslzHandler.cpp257
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/MubHandler.cpp266
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Nsis/NsisDecode.cpp130
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Nsis/NsisDecode.h47
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Nsis/NsisHandler.cpp510
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Nsis/NsisHandler.h43
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Nsis/NsisIn.cpp1461
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Nsis/NsisIn.h181
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Nsis/NsisRegister.cpp13
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/NtfsHandler.cpp1764
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/PeHandler.cpp1752
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/PpmdHandler.cpp456
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Rar/RarHandler.cpp869
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Rar/RarHandler.h66
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Rar/RarHeader.cpp21
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Rar/RarHeader.h205
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Rar/RarIn.cpp478
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Rar/RarIn.h123
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Rar/RarItem.cpp55
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Rar/RarItem.h79
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Rar/RarRegister.cpp13
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Rar/RarVolumeInStream.cpp78
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Rar/RarVolumeInStream.h49
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/RpmHandler.cpp292
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/SplitHandler.cpp366
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/SquashfsHandler.cpp2155
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/SwfHandler.cpp706
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarHandler.cpp386
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarHandler.h61
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarHandlerOut.cpp122
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarHeader.cpp25
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarHeader.h108
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarIn.cpp207
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarIn.h17
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarItem.h72
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarOut.cpp187
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarOut.h28
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarRegister.cpp18
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarUpdate.cpp139
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarUpdate.h34
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Udf/UdfHandler.cpp451
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Udf/UdfHandler.h37
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Udf/UdfIn.cpp876
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Udf/UdfIn.h375
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Udf/UdfRegister.cpp13
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/VhdHandler.cpp734
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Wim/WimHandler.cpp660
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Wim/WimHandler.h77
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Wim/WimHandlerOut.cpp639
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Wim/WimIn.cpp855
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Wim/WimIn.h297
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Wim/WimRegister.cpp18
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/XarHandler.cpp588
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/XzHandler.cpp707
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/ZHandler.cpp161
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipAddCommon.cpp379
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipAddCommon.h56
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipCompressionMode.h42
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipHandler.cpp822
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipHandler.h101
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp537
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipHeader.cpp36
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipHeader.h284
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipIn.cpp893
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipIn.h125
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipItem.cpp181
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipItem.h281
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipItemEx.h34
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipOut.cpp289
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipOut.h56
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipRegister.cpp18
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipUpdate.cpp1076
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipUpdate.h58
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/CWrappers.cpp226
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/CWrappers.h109
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/CreateCoder.cpp293
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/CreateCoder.h98
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/FilePathAutoRename.cpp55
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/FilePathAutoRename.h10
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/FileStreams.cpp273
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/FileStreams.h134
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/FilterCoder.cpp247
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/FilterCoder.h128
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/InBuffer.cpp83
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/InBuffer.h81
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/InOutTempBuffer.cpp122
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/InOutTempBuffer.h48
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/LimitedStreams.cpp154
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/LimitedStreams.h125
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/LockedStream.cpp23
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/LockedStream.h38
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/MemBlocks.cpp183
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/MemBlocks.h71
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/MethodId.cpp27
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/MethodId.h10
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/MethodProps.cpp99
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/MethodProps.h41
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/OffsetStream.cpp35
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/OffsetStream.h25
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/OutBuffer.cpp116
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/OutBuffer.h64
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/OutMemStream.cpp142
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/OutMemStream.h96
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/ProgressMt.cpp53
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/ProgressMt.h46
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/ProgressUtils.cpp42
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/ProgressUtils.h34
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/RegisterArc.h32
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/RegisterCodec.h34
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/StreamBinder.cpp152
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/StreamBinder.h38
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/StreamObjects.cpp221
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/StreamObjects.h135
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/StreamUtils.cpp56
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/StreamUtils.h13
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/VirtThread.cpp46
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Common/VirtThread.h23
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ArjDecoder1.cpp309
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ArjDecoder1.h98
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ArjDecoder2.cpp90
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ArjDecoder2.h59
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BZip2Const.h54
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BZip2Crc.cpp26
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BZip2Crc.h31
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BZip2Decoder.cpp943
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BZip2Decoder.h205
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BZip2Encoder.cpp895
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BZip2Encoder.h245
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BZip2Register.cpp20
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Bcj2Coder.cpp386
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Bcj2Coder.h115
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Bcj2Register.cpp19
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BcjCoder.cpp15
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BcjCoder.h19
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BcjRegister.cpp19
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BitlDecoder.cpp24
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BitlDecoder.h141
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BitlEncoder.h57
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BitmDecoder.h66
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BitmEncoder.h50
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BranchCoder.cpp19
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BranchCoder.h44
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BranchMisc.cpp37
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BranchMisc.h14
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BranchRegister.cpp30
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ByteSwap.cpp73
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/CodecExports.cpp160
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/CopyCoder.cpp67
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/CopyCoder.h34
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/CopyRegister.cpp14
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Deflate64Register.cpp20
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/DeflateConst.h134
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/DeflateDecoder.cpp353
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/DeflateDecoder.h157
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/DeflateEncoder.cpp986
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/DeflateEncoder.h211
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/DeflateNsisRegister.cpp14
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/DeflateRegister.cpp21
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/DeltaFilter.cpp112
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/DllExports.cpp39
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/DllExports2.cpp28
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/HuffmanDecoder.h89
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ImplodeDecoder.cpp219
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ImplodeDecoder.h57
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ImplodeHuffmanDecoder.cpp89
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ImplodeHuffmanDecoder.h34
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LZMA_Alone/LzmaAlone.cpp531
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LZMA_Alone/LzmaBench.cpp1018
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LZMA_Alone/LzmaBench.h48
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LZMA_Alone/LzmaBenchCon.cpp311
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LZMA_Alone/LzmaBenchCon.h20
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LzOutWindow.cpp14
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LzOutWindow.h66
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LzhDecoder.cpp220
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LzhDecoder.h106
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Lzma2Decoder.cpp189
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Lzma2Decoder.h73
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Lzma2Encoder.cpp94
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Lzma2Encoder.h36
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Lzma2Register.cpp20
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LzmaDecoder.cpp252
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LzmaDecoder.h84
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LzmaEncoder.cpp149
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LzmaEncoder.h36
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LzmaRegister.cpp20
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Lzx.h61
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Lzx86Converter.cpp90
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Lzx86Converter.h46
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LzxDecoder.cpp387
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/LzxDecoder.h159
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Mtf8.h193
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/PPMD_Alone/PpmdAlone.cpp348
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/PpmdContext.h490
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/PpmdDecode.h156
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/PpmdDecoder.cpp167
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/PpmdDecoder.h78
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/PpmdEncode.h142
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/PpmdEncoder.cpp119
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/PpmdEncoder.h48
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/PpmdRegister.cpp21
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/PpmdSubAlloc.h293
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/PpmdType.h14
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/PpmdZip.cpp223
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/PpmdZip.h72
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/QuantumDecoder.cpp175
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/QuantumDecoder.h264
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/RangeCoder.h205
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/RangeCoderBit.h114
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Rar1Decoder.cpp480
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Rar1Decoder.h88
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Rar2Decoder.cpp391
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Rar2Decoder.h174
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Rar3Decoder.cpp897
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Rar3Decoder.h267
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Rar3Vm.cpp1091
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Rar3Vm.h179
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/RarCodecsRegister.cpp26
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ShrinkDecoder.cpp145
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ShrinkDecoder.h38
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ZDecoder.cpp159
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ZDecoder.h42
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ZlibDecoder.cpp89
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ZlibDecoder.h48
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ZlibEncoder.cpp61
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/ZlibEncoder.h48
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/7zAes.cpp244
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/7zAes.h117
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/7zAesRegister.cpp18
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/HmacSha1.cpp109
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/HmacSha1.h39
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/MyAes.cpp48
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/MyAes.h38
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp83
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/Pbkdf2HmacSha1.h21
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/RandGen.cpp107
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/RandGen.h21
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/Rar20Crypto.cpp133
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/Rar20Crypto.h50
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/RarAes.cpp134
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/RarAes.h47
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/Sha1.cpp229
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/Sha1.h68
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/WzAes.cpp221
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/WzAes.h125
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/ZipCrypto.cpp88
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/ZipCrypto.h56
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/ZipStrong.cpp164
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Crypto/ZipStrong.h47
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Guid.txt170
-rw-r--r--src/libs/7zip/unix/CPP/7zip/ICoder.h186
-rw-r--r--src/libs/7zip/unix/CPP/7zip/IDecl.h15
-rw-r--r--src/libs/7zip/unix/CPP/7zip/IPassword.h24
-rw-r--r--src/libs/7zip/unix/CPP/7zip/IProgress.h33
-rw-r--r--src/libs/7zip/unix/CPP/7zip/IStream.h58
-rw-r--r--src/libs/7zip/unix/CPP/7zip/MyVersion.h11
-rw-r--r--src/libs/7zip/unix/CPP/7zip/PropID.h76
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ArchiveCommandLine.cpp1010
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ArchiveCommandLine.h111
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp488
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ArchiveExtractCallback.h143
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ArchiveName.cpp54
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ArchiveName.h10
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp133
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ArchiveOpenCallback.h103
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/Bench.cpp1028
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/Bench.h42
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/CompressCall.cpp470
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/CompressCall.h24
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/DefaultName.cpp35
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/DefaultName.h11
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/DirItem.h69
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/EnumDirItems.cpp361
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/EnumDirItems.h25
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ExitCode.h27
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/Extract.cpp263
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/Extract.h76
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ExtractMode.h31
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ExtractingFilePath.cpp142
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ExtractingFilePath.h13
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/HandlerLoader.h38
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/IFileExtractCallback.h46
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/LoadCodecs.cpp716
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/LoadCodecs.h235
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/OpenArchive.cpp536
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/OpenArchive.h87
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/PropIDUtils.cpp120
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/PropIDUtils.h12
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/Property.h14
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/SetProperties.cpp79
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/SetProperties.h10
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/SortUtils.cpp22
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/SortUtils.h10
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/TempFiles.cpp22
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/TempFiles.h16
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/Update.cpp912
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/Update.h175
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/UpdateAction.cpp64
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/UpdateAction.h57
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/UpdateCallback.cpp249
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/UpdateCallback.h74
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/UpdatePair.cpp158
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/UpdatePair.h25
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/UpdateProduce.cpp58
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/UpdateProduce.h35
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/WorkDir.cpp59
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/WorkDir.h10
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ZipRegistry.cpp293
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/ZipRegistry.h105
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/BenchCon.cpp297
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/BenchCon.h16
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/ConsoleClose.cpp49
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/ConsoleClose.h26
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp228
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/ExtractCallbackConsole.h73
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/List.cpp654
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/List.h20
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/Main.cpp628
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/MainAr.cpp127
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/OpenCallbackConsole.cpp58
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/OpenCallbackConsole.h24
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/PercentPrinter.cpp90
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/PercentPrinter.h31
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp261
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/UpdateCallbackConsole.h62
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/UserInputUtils.cpp96
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Console/UserInputUtils.h24
-rw-r--r--src/libs/7zip/unix/CPP/Common/AutoPtr.h35
-rw-r--r--src/libs/7zip/unix/CPP/Common/Buffer.h77
-rw-r--r--src/libs/7zip/unix/CPP/Common/CRC.cpp7
-rw-r--r--src/libs/7zip/unix/CPP/Common/C_FileIO.cpp88
-rw-r--r--src/libs/7zip/unix/CPP/Common/C_FileIO.h47
-rw-r--r--src/libs/7zip/unix/CPP/Common/ComTry.h18
-rw-r--r--src/libs/7zip/unix/CPP/Common/CommandLineParser.cpp230
-rw-r--r--src/libs/7zip/unix/CPP/Common/CommandLineParser.h72
-rw-r--r--src/libs/7zip/unix/CPP/Common/Defs.h20
-rw-r--r--src/libs/7zip/unix/CPP/Common/DynamicBuffer.h50
-rw-r--r--src/libs/7zip/unix/CPP/Common/IntToString.cpp77
-rw-r--r--src/libs/7zip/unix/CPP/Common/IntToString.h19
-rw-r--r--src/libs/7zip/unix/CPP/Common/Lang.cpp130
-rw-r--r--src/libs/7zip/unix/CPP/Common/Lang.h28
-rw-r--r--src/libs/7zip/unix/CPP/Common/ListFileUtils.cpp75
-rw-r--r--src/libs/7zip/unix/CPP/Common/ListFileUtils.h11
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyCom.h225
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyException.h14
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyGuidDef.h54
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyInitGuid.h22
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyMap.cpp140
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyMap.h28
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyString.cpp206
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyString.h601
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyUnknown.h13
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyVector.cpp87
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyVector.h266
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyWindows.cpp111
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyWindows.h218
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyXml.cpp209
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyXml.h40
-rw-r--r--src/libs/7zip/unix/CPP/Common/NewHandler.h16
-rw-r--r--src/libs/7zip/unix/CPP/Common/StdInStream.cpp100
-rw-r--r--src/libs/7zip/unix/CPP/Common/StdInStream.h32
-rw-r--r--src/libs/7zip/unix/CPP/Common/StdOutStream.cpp93
-rw-r--r--src/libs/7zip/unix/CPP/Common/StdOutStream.h35
-rw-r--r--src/libs/7zip/unix/CPP/Common/StringConvert.cpp181
-rw-r--r--src/libs/7zip/unix/CPP/Common/StringConvert.h73
-rw-r--r--src/libs/7zip/unix/CPP/Common/StringToInt.cpp90
-rw-r--r--src/libs/7zip/unix/CPP/Common/StringToInt.h18
-rw-r--r--src/libs/7zip/unix/CPP/Common/TextConfig.cpp138
-rw-r--r--src/libs/7zip/unix/CPP/Common/TextConfig.h22
-rw-r--r--src/libs/7zip/unix/CPP/Common/Types.h11
-rw-r--r--src/libs/7zip/unix/CPP/Common/UTFConvert.cpp145
-rw-r--r--src/libs/7zip/unix/CPP/Common/UTFConvert.h11
-rw-r--r--src/libs/7zip/unix/CPP/Common/Wildcard.cpp462
-rw-r--r--src/libs/7zip/unix/CPP/Common/Wildcard.h80
-rw-r--r--src/libs/7zip/unix/CPP/Windows/COM.cpp37
-rw-r--r--src/libs/7zip/unix/CPP/Windows/COM.h69
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Clipboard.cpp160
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Clipboard.h28
-rw-r--r--src/libs/7zip/unix/CPP/Windows/CommonDialog.h19
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Control/ComboBox.h82
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Control/Controls.cpp515
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Control/Dialog.cpp560
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Control/Dialog.h179
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Control/DialogImpl.h73
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Control/Edit.h24
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Control/ListView.h164
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Control/ProgressBar.h34
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Control/Static.h23
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Control/StatusBar.h56
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Control/Window2.cpp211
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Control/Window2.h111
-rw-r--r--src/libs/7zip/unix/CPP/Windows/DLL.cpp193
-rw-r--r--src/libs/7zip/unix/CPP/Windows/DLL.h48
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Defs.h17
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Error.cpp58
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Error.h33
-rw-r--r--src/libs/7zip/unix/CPP/Windows/FileDir.cpp927
-rw-r--r--src/libs/7zip/unix/CPP/Windows/FileDir.h115
-rw-r--r--src/libs/7zip/unix/CPP/Windows/FileFind.cpp604
-rw-r--r--src/libs/7zip/unix/CPP/Windows/FileFind.h126
-rw-r--r--src/libs/7zip/unix/CPP/Windows/FileIO.cpp475
-rw-r--r--src/libs/7zip/unix/CPP/Windows/FileIO.h110
-rw-r--r--src/libs/7zip/unix/CPP/Windows/FileName.cpp50
-rw-r--r--src/libs/7zip/unix/CPP/Windows/FileName.h27
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Handle.h37
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Menu.h4
-rw-r--r--src/libs/7zip/unix/CPP/Windows/NtCheck.h44
-rw-r--r--src/libs/7zip/unix/CPP/Windows/PropVariant.cpp243
-rw-r--r--src/libs/7zip/unix/CPP/Windows/PropVariant.h56
-rw-r--r--src/libs/7zip/unix/CPP/Windows/PropVariantConversions.cpp142
-rw-r--r--src/libs/7zip/unix/CPP/Windows/PropVariantConversions.h14
-rw-r--r--src/libs/7zip/unix/CPP/Windows/PropVariantUtils.cpp78
-rw-r--r--src/libs/7zip/unix/CPP/Windows/PropVariantUtils.h28
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Registry.cpp313
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Registry.h113
-rw-r--r--src/libs/7zip/unix/CPP/Windows/ResourceString.h22
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Shell.h21
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Synchronization.cpp157
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Synchronization.h187
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Synchronization2.h218
-rw-r--r--src/libs/7zip/unix/CPP/Windows/System.cpp166
-rw-r--r--src/libs/7zip/unix/CPP/Windows/System.h16
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Thread.h41
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Time.cpp88
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Time.h21
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Window.cpp101
-rw-r--r--src/libs/7zip/unix/CPP/Windows/Window.h43
-rw-r--r--src/libs/7zip/unix/CPP/include_windows/basetyps.h19
-rw-r--r--src/libs/7zip/unix/CPP/include_windows/tchar.h89
-rw-r--r--src/libs/7zip/unix/CPP/include_windows/windows.h194
-rw-r--r--src/libs/7zip/unix/CPP/myWindows/StdAfx.h124
-rw-r--r--src/libs/7zip/unix/CPP/myWindows/config.h67
-rw-r--r--src/libs/7zip/unix/CPP/myWindows/initguid.h4
-rw-r--r--src/libs/7zip/unix/CPP/myWindows/myAddExeFlag.cpp20
-rw-r--r--src/libs/7zip/unix/CPP/myWindows/myGetTickCount.cpp8
-rw-r--r--src/libs/7zip/unix/CPP/myWindows/myPrivate.h17
-rw-r--r--src/libs/7zip/unix/CPP/myWindows/mySplitCommandLine.cpp82
-rw-r--r--src/libs/7zip/unix/CPP/myWindows/test_emul.cpp745
-rw-r--r--src/libs/7zip/unix/CPP/myWindows/wine_GetXXXDefaultLangID.cpp741
-rw-r--r--src/libs/7zip/unix/CPP/myWindows/wine_date_and_time.cpp434
-rw-r--r--src/libs/7zip/unix/ChangeLog914
-rw-r--r--src/libs/7zip/unix/DOCS/7zC.txt194
-rw-r--r--src/libs/7zip/unix/DOCS/7zFormat.txt469
-rw-r--r--src/libs/7zip/unix/DOCS/License.txt52
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/commands/add.htm87
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/commands/bench.htm79
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/commands/delete.htm59
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/commands/extract.htm91
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/commands/extract_full.htm68
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/commands/index.htm33
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/commands/list.htm77
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/commands/style.css232
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/commands/test.htm46
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/commands/update.htm66
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/exit_codes.htm27
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/index.htm29
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/style.css232
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/ar_exclude.htm56
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/ar_include.htm83
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/ar_no.htm52
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/charset.htm49
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/exclude.htm60
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/include.htm87
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/index.htm64
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/large_pages.htm50
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/list_tech.htm36
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/method.htm625
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/output_dir.htm53
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/overwrite.htm56
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/password.htm54
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/recurse.htm83
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/sfx.htm156
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/ssc.htm50
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/stdin.htm55
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/stdout.htm50
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/stop_switch.htm31
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/style.css232
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/type.htm83
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/update.htm176
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/volume.htm49
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/working_dir.htm55
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/switches/yes.htm48
-rw-r--r--src/libs/7zip/unix/DOCS/MANUAL/syntax.htm120
-rw-r--r--src/libs/7zip/unix/DOCS/Methods.txt152
-rw-r--r--src/libs/7zip/unix/DOCS/copying.txt504
-rw-r--r--src/libs/7zip/unix/DOCS/history.txt456
-rw-r--r--src/libs/7zip/unix/DOCS/lzma.txt598
-rw-r--r--src/libs/7zip/unix/DOCS/readme.txt181
-rw-r--r--src/libs/7zip/unix/DOCS/unRarLicense.txt41
-rw-r--r--src/libs/7zip/unix/README358
-rw-r--r--src/libs/7zip/unix/TODO39
-rw-r--r--src/libs/7zip/unix/installer_framework_changes.txt511
-rw-r--r--src/libs/7zip/unix/unix.pri228
-rw-r--r--src/libs/7zip/win/C/7z.h203
-rw-r--r--src/libs/7zip/win/C/7zAlloc.c76
-rw-r--r--src/libs/7zip/win/C/7zAlloc.h15
-rw-r--r--src/libs/7zip/win/C/7zBuf.c36
-rw-r--r--src/libs/7zip/win/C/7zBuf.h39
-rw-r--r--src/libs/7zip/win/C/7zBuf2.c45
-rw-r--r--src/libs/7zip/win/C/7zCrc.c74
-rw-r--r--src/libs/7zip/win/C/7zCrc.h25
-rw-r--r--src/libs/7zip/win/C/7zCrcOpt.c34
-rw-r--r--src/libs/7zip/win/C/7zDec.c470
-rw-r--r--src/libs/7zip/win/C/7zFile.c284
-rw-r--r--src/libs/7zip/win/C/7zFile.h83
-rw-r--r--src/libs/7zip/win/C/7zIn.c1402
-rw-r--r--src/libs/7zip/win/C/7zStream.c169
-rw-r--r--src/libs/7zip/win/C/7zVersion.h7
-rw-r--r--src/libs/7zip/win/C/Aes.c282
-rw-r--r--src/libs/7zip/win/C/Aes.h38
-rw-r--r--src/libs/7zip/win/C/AesOpt.c182
-rw-r--r--src/libs/7zip/win/C/Alloc.c127
-rw-r--r--src/libs/7zip/win/C/Alloc.h38
-rw-r--r--src/libs/7zip/win/C/Bcj2.c132
-rw-r--r--src/libs/7zip/win/C/Bcj2.h38
-rw-r--r--src/libs/7zip/win/C/Bra.c133
-rw-r--r--src/libs/7zip/win/C/Bra.h68
-rw-r--r--src/libs/7zip/win/C/Bra86.c85
-rw-r--r--src/libs/7zip/win/C/BraIA64.c67
-rw-r--r--src/libs/7zip/win/C/BwtSort.c516
-rw-r--r--src/libs/7zip/win/C/BwtSort.h30
-rw-r--r--src/libs/7zip/win/C/CpuArch.c168
-rw-r--r--src/libs/7zip/win/C/CpuArch.h155
-rw-r--r--src/libs/7zip/win/C/Delta.c62
-rw-r--r--src/libs/7zip/win/C/Delta.h23
-rw-r--r--src/libs/7zip/win/C/HuffEnc.c146
-rw-r--r--src/libs/7zip/win/C/HuffEnc.h27
-rw-r--r--src/libs/7zip/win/C/LzFind.c761
-rw-r--r--src/libs/7zip/win/C/LzFind.h115
-rw-r--r--src/libs/7zip/win/C/LzFindMt.c793
-rw-r--r--src/libs/7zip/win/C/LzFindMt.h105
-rw-r--r--src/libs/7zip/win/C/LzHash.h54
-rw-r--r--src/libs/7zip/win/C/Lzma2Dec.c356
-rw-r--r--src/libs/7zip/win/C/Lzma2Dec.h84
-rw-r--r--src/libs/7zip/win/C/Lzma2Enc.c477
-rw-r--r--src/libs/7zip/win/C/Lzma2Enc.h66
-rw-r--r--src/libs/7zip/win/C/Lzma86.h111
-rw-r--r--src/libs/7zip/win/C/Lzma86Dec.c56
-rw-r--r--src/libs/7zip/win/C/Lzma86Enc.c108
-rw-r--r--src/libs/7zip/win/C/LzmaDec.c999
-rw-r--r--src/libs/7zip/win/C/LzmaDec.h231
-rw-r--r--src/libs/7zip/win/C/LzmaEnc.c2268
-rw-r--r--src/libs/7zip/win/C/LzmaEnc.h80
-rw-r--r--src/libs/7zip/win/C/LzmaLib.c46
-rw-r--r--src/libs/7zip/win/C/LzmaLib.h135
-rw-r--r--src/libs/7zip/win/C/MtCoder.c327
-rw-r--r--src/libs/7zip/win/C/MtCoder.h98
-rw-r--r--src/libs/7zip/win/C/Ppmd.h81
-rw-r--r--src/libs/7zip/win/C/Ppmd7.c708
-rw-r--r--src/libs/7zip/win/C/Ppmd7.h140
-rw-r--r--src/libs/7zip/win/C/Ppmd7Dec.c187
-rw-r--r--src/libs/7zip/win/C/Ppmd7Enc.c185
-rw-r--r--src/libs/7zip/win/C/Ppmd8.c1120
-rw-r--r--src/libs/7zip/win/C/Ppmd8.h133
-rw-r--r--src/libs/7zip/win/C/Ppmd8Dec.c155
-rw-r--r--src/libs/7zip/win/C/Ppmd8Enc.c161
-rw-r--r--src/libs/7zip/win/C/RotateDefs.h20
-rw-r--r--src/libs/7zip/win/C/Sha256.c204
-rw-r--r--src/libs/7zip/win/C/Sha256.h26
-rw-r--r--src/libs/7zip/win/C/Sort.c93
-rw-r--r--src/libs/7zip/win/C/Sort.h20
-rw-r--r--src/libs/7zip/win/C/Threads.c84
-rw-r--r--src/libs/7zip/win/C/Threads.h59
-rw-r--r--src/libs/7zip/win/C/Types.h254
-rw-r--r--src/libs/7zip/win/C/Xz.c88
-rw-r--r--src/libs/7zip/win/C/Xz.h252
-rw-r--r--src/libs/7zip/win/C/XzCrc64.c33
-rw-r--r--src/libs/7zip/win/C/XzCrc64.h26
-rw-r--r--src/libs/7zip/win/C/XzDec.c875
-rw-r--r--src/libs/7zip/win/C/XzEnc.c497
-rw-r--r--src/libs/7zip/win/C/XzEnc.h25
-rw-r--r--src/libs/7zip/win/C/XzIn.c306
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zCompressionMode.cpp3
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zCompressionMode.h50
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zDecode.cpp332
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zDecode.h68
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zEncode.cpp444
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zEncode.h55
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zExtract.cpp270
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zFolderInStream.cpp123
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zFolderInStream.h58
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zFolderOutStream.cpp149
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zFolderOutStream.h58
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zHandler.cpp482
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zHandler.h119
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zHandlerOut.cpp483
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zHeader.cpp14
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zHeader.h97
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zIn.cpp1276
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zIn.h245
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zItem.h268
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zOut.cpp866
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zOut.h152
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zProperties.cpp164
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zProperties.h22
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zRegister.cpp18
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zSpecStream.cpp24
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zSpecStream.h35
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zUpdate.cpp1177
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zUpdate.h88
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/StdAfx.cpp3
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/StdAfx.h9
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/ApmHandler.cpp356
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/ArchiveExports.cpp135
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/ArjHandler.cpp798
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Bz2Handler.cpp423
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Cab/CabBlockInStream.cpp189
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Cab/CabBlockInStream.h44
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Cab/CabHandler.cpp929
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Cab/CabHandler.h28
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Cab/CabHeader.cpp15
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Cab/CabHeader.h44
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Cab/CabIn.cpp272
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Cab/CabIn.h161
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Cab/CabItem.h63
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Cab/CabRegister.cpp13
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Cab/StdAfx.h8
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Chm/ChmHandler.cpp721
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Chm/ChmHandler.h29
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Chm/ChmHeader.cpp24
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Chm/ChmHeader.h28
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Chm/ChmIn.cpp937
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Chm/ChmIn.h244
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Chm/ChmRegister.cpp13
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Chm/StdAfx.h8
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Com/ComHandler.cpp239
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Com/ComHandler.h28
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Com/ComIn.cpp389
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Com/ComIn.h119
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Com/ComRegister.cpp13
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/CoderMixer.cpp19
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/CoderMixer.h32
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/CoderMixer2.cpp121
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/CoderMixer2.h174
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/CoderMixer2MT.cpp240
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/CoderMixer2MT.h80
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/CoderMixer2ST.cpp239
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/CoderMixer2ST.h88
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/CoderMixerMT.cpp99
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/CoderMixerMT.h69
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/CrossThreadProgress.cpp15
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/CrossThreadProgress.h37
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/DummyOutStream.cpp22
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/DummyOutStream.h24
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/FindSignature.cpp62
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/FindSignature.h12
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/HandlerOut.cpp623
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/HandlerOut.h87
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/InStreamWithCRC.cpp42
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/InStreamWithCRC.h67
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/ItemNameUtils.cpp61
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/ItemNameUtils.h24
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/MultiStream.cpp190
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/MultiStream.h84
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp18
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/OutStreamWithCRC.h36
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/OutStreamWithSha1.cpp18
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/OutStreamWithSha1.h36
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/ParseProperties.cpp177
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/ParseProperties.h18
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/StdAfx.h9
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/CpioHandler.cpp624
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/CramfsHandler.cpp644
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/DebHandler.cpp413
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/DeflateProps.cpp118
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/DeflateProps.h35
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/DllExports.cpp47
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/DllExports2.cpp74
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/DmgHandler.cpp918
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/ElfHandler.cpp534
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/FatHandler.cpp996
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/FlvHandler.cpp544
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/GzHandler.cpp698
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Hfs/HfsHandler.cpp243
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Hfs/HfsHandler.h26
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Hfs/HfsIn.cpp480
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Hfs/HfsIn.h154
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Hfs/HfsRegister.cpp13
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/IArchive.h234
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Iso/IsoHandler.cpp326
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Iso/IsoHandler.h30
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Iso/IsoHeader.cpp21
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Iso/IsoHeader.h61
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Iso/IsoIn.cpp453
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Iso/IsoIn.h315
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Iso/IsoItem.h141
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Iso/IsoRegister.cpp13
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Iso/StdAfx.h9
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/LzhHandler.cpp775
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/LzmaHandler.cpp430
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/MachoHandler.cpp500
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/MbrHandler.cpp507
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/MslzHandler.cpp257
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/MubHandler.cpp266
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Nsis/NsisDecode.cpp130
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Nsis/NsisDecode.h47
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Nsis/NsisHandler.cpp510
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Nsis/NsisHandler.h43
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Nsis/NsisIn.cpp1461
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Nsis/NsisIn.h181
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Nsis/NsisRegister.cpp13
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Nsis/StdAfx.h9
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/NtfsHandler.cpp1764
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/PeHandler.cpp1752
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/PpmdHandler.cpp456
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Rar/RarHandler.cpp869
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Rar/RarHandler.h66
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Rar/RarHeader.cpp21
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Rar/RarHeader.h205
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Rar/RarIn.cpp478
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Rar/RarIn.h123
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Rar/RarItem.cpp55
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Rar/RarItem.h79
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Rar/RarRegister.cpp13
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Rar/RarVolumeInStream.cpp78
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Rar/RarVolumeInStream.h49
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Rar/StdAfx.cpp3
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Rar/StdAfx.h8
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/RpmHandler.cpp292
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/SplitHandler.cpp366
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/SquashfsHandler.cpp2155
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/StdAfx.h9
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/SwfHandler.cpp706
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/StdAfx.h9
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarHandler.cpp386
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarHandler.h61
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarHandlerOut.cpp122
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarHeader.cpp25
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarHeader.h108
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarIn.cpp207
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarIn.h17
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarItem.h72
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarOut.cpp187
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarOut.h28
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarRegister.cpp18
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarUpdate.cpp139
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarUpdate.h34
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Udf/StdAfx.h9
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Udf/UdfHandler.cpp451
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Udf/UdfHandler.h37
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Udf/UdfIn.cpp876
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Udf/UdfIn.h375
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Udf/UdfRegister.cpp13
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/VhdHandler.cpp734
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Wim/StdAfx.h8
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Wim/WimHandler.cpp660
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Wim/WimHandler.h77
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Wim/WimHandlerOut.cpp639
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Wim/WimIn.cpp855
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Wim/WimIn.h297
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Wim/WimRegister.cpp18
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/XarHandler.cpp588
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/XzHandler.cpp707
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/ZHandler.cpp161
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/StdAfx.h8
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipAddCommon.cpp379
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipAddCommon.h56
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipCompressionMode.h42
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHandler.cpp822
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHandler.h101
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp531
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHeader.cpp36
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHeader.h284
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipIn.cpp893
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipIn.h125
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipItem.cpp172
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipItem.h281
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipItemEx.h34
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipOut.cpp289
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipOut.h56
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipRegister.cpp18
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipUpdate.cpp1068
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipUpdate.h58
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/CWrappers.cpp226
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/CWrappers.h109
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/CreateCoder.cpp293
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/CreateCoder.h98
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/FilePathAutoRename.cpp55
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/FilePathAutoRename.h10
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/FileStreams.cpp422
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/FileStreams.h144
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/FilterCoder.cpp247
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/FilterCoder.h128
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/InBuffer.cpp83
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/InBuffer.h81
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/InMemStream.cpp222
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/InMemStream.h284
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/InOutTempBuffer.cpp122
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/InOutTempBuffer.h48
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/LimitedStreams.cpp154
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/LimitedStreams.h125
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/LockedStream.cpp23
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/LockedStream.h38
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/MemBlocks.cpp183
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/MemBlocks.h71
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/MethodId.cpp27
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/MethodId.h10
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/MethodProps.cpp99
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/MethodProps.h41
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/OffsetStream.cpp35
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/OffsetStream.h25
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/OutBuffer.cpp116
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/OutBuffer.h64
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/OutMemStream.cpp142
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/OutMemStream.h96
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/ProgressMt.cpp53
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/ProgressMt.h46
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/ProgressUtils.cpp42
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/ProgressUtils.h34
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/RegisterArc.h32
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/RegisterCodec.h34
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/StdAfx.h9
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/StreamBinder.cpp150
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/StreamBinder.h32
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/StreamObjects.cpp221
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/StreamObjects.h135
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/StreamUtils.cpp56
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/StreamUtils.h13
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/VirtThread.cpp46
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/VirtThread.h23
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ArjDecoder1.cpp309
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ArjDecoder1.h98
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ArjDecoder2.cpp90
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ArjDecoder2.h59
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BZip2Const.h54
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BZip2Crc.cpp26
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BZip2Crc.h31
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BZip2Decoder.cpp943
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BZip2Decoder.h205
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BZip2Encoder.cpp895
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BZip2Encoder.h245
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BZip2Register.cpp20
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Bcj2Coder.cpp386
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Bcj2Coder.h115
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Bcj2Register.cpp19
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BcjCoder.cpp15
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BcjCoder.h19
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BcjRegister.cpp19
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BitlDecoder.cpp24
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BitlDecoder.h141
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BitlEncoder.h57
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BitmDecoder.h66
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BitmEncoder.h50
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BranchCoder.cpp19
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BranchCoder.h44
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BranchMisc.cpp37
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BranchMisc.h14
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BranchRegister.cpp30
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ByteSwap.cpp73
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/CodecExports.cpp160
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/CopyCoder.cpp67
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/CopyCoder.h34
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/CopyRegister.cpp14
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Deflate64Register.cpp20
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/DeflateConst.h134
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/DeflateDecoder.cpp353
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/DeflateDecoder.h157
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/DeflateEncoder.cpp986
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/DeflateEncoder.h211
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/DeflateRegister.cpp21
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/DeltaFilter.cpp112
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/DllExports.cpp45
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/DllExports2.cpp28
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/HuffmanDecoder.h89
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ImplodeDecoder.cpp219
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ImplodeDecoder.h57
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ImplodeHuffmanDecoder.cpp89
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ImplodeHuffmanDecoder.h34
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/LzOutWindow.cpp14
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/LzOutWindow.h66
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/LzhDecoder.cpp220
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/LzhDecoder.h106
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Lzma2Decoder.cpp189
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Lzma2Decoder.h73
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Lzma2Encoder.cpp94
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Lzma2Encoder.h36
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Lzma2Register.cpp20
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/LzmaDecoder.cpp252
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/LzmaDecoder.h84
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/LzmaEncoder.cpp149
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/LzmaEncoder.h36
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/LzmaRegister.cpp20
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Lzx.h61
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Lzx86Converter.cpp90
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Lzx86Converter.h46
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/LzxDecoder.cpp387
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/LzxDecoder.h159
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Mtf8.h193
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/PpmdDecoder.cpp167
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/PpmdDecoder.h78
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/PpmdEncoder.cpp119
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/PpmdEncoder.h48
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/PpmdRegister.cpp21
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/PpmdZip.cpp223
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/PpmdZip.h72
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/QuantumDecoder.cpp175
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/QuantumDecoder.h264
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/RangeCoder.h205
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/RangeCoderBit.h114
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Rar1Decoder.cpp480
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Rar1Decoder.h88
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Rar2Decoder.cpp391
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Rar2Decoder.h174
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Rar3Decoder.cpp897
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Rar3Decoder.h267
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Rar3Vm.cpp1091
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/Rar3Vm.h179
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/RarCodecsRegister.cpp26
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ShrinkDecoder.cpp145
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ShrinkDecoder.h38
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/StdAfx.h8
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ZDecoder.cpp159
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ZDecoder.h42
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ZlibDecoder.cpp89
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ZlibDecoder.h48
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ZlibEncoder.cpp61
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/ZlibEncoder.h48
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/7zAes.cpp244
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/7zAes.h117
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/7zAesRegister.cpp18
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/HmacSha1.cpp109
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/HmacSha1.h39
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/MyAes.cpp48
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/MyAes.h38
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp83
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/Pbkdf2HmacSha1.h21
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/RandGen.cpp107
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/RandGen.h21
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/Rar20Crypto.cpp133
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/Rar20Crypto.h50
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/RarAes.cpp134
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/RarAes.h47
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/Sha1.cpp229
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/Sha1.h68
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/StdAfx.h8
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/WzAes.cpp221
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/WzAes.h125
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/ZipCrypto.cpp88
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/ZipCrypto.h56
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/ZipStrong.cpp164
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/ZipStrong.h47
-rw-r--r--src/libs/7zip/win/CPP/7zip/Guid.txt170
-rw-r--r--src/libs/7zip/win/CPP/7zip/ICoder.h186
-rw-r--r--src/libs/7zip/win/CPP/7zip/IDecl.h15
-rw-r--r--src/libs/7zip/win/CPP/7zip/IPassword.h24
-rw-r--r--src/libs/7zip/win/CPP/7zip/IProgress.h33
-rw-r--r--src/libs/7zip/win/CPP/7zip/IStream.h58
-rw-r--r--src/libs/7zip/win/CPP/7zip/MyVersion.h8
-rw-r--r--src/libs/7zip/win/CPP/7zip/PropID.h76
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveCommandLine.cpp1042
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveCommandLine.h111
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp488
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveExtractCallback.h143
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveName.cpp54
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveName.h10
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp133
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveOpenCallback.h103
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/Bench.cpp1028
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/Bench.h42
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/CompressCall.cpp246
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/CompressCall.h24
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/CompressCall2.cpp178
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/DefaultName.cpp35
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/DefaultName.h11
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/DirItem.h69
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/EnumDirItems.cpp361
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/EnumDirItems.h25
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ExitCode.h27
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/Extract.cpp263
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/Extract.h76
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ExtractMode.h31
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ExtractingFilePath.cpp142
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ExtractingFilePath.h13
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/IFileExtractCallback.h46
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/LoadCodecs.cpp681
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/LoadCodecs.h235
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/OpenArchive.cpp536
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/OpenArchive.h87
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/PropIDUtils.cpp120
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/PropIDUtils.h12
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/Property.h14
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/SetProperties.cpp79
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/SetProperties.h10
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/SortUtils.cpp22
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/SortUtils.h10
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/StdAfx.h9
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/TempFiles.cpp22
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/TempFiles.h16
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/Update.cpp910
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/Update.h175
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/UpdateAction.cpp64
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/UpdateAction.h57
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/UpdateCallback.cpp249
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/UpdateCallback.h74
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/UpdatePair.cpp158
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/UpdatePair.h25
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/UpdateProduce.cpp58
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/UpdateProduce.h35
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/WorkDir.cpp59
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/WorkDir.h10
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ZipRegistry.cpp293
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ZipRegistry.h105
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/BenchCon.cpp297
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/BenchCon.h16
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/ConsoleClose.cpp73
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/ConsoleClose.h24
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp228
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/ExtractCallbackConsole.h73
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/List.cpp654
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/List.h20
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/Main.cpp598
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/MainAr.cpp125
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/OpenCallbackConsole.cpp58
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/OpenCallbackConsole.h24
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/PercentPrinter.cpp90
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/PercentPrinter.h31
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/StdAfx.cpp3
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/StdAfx.h9
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp261
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/UpdateCallbackConsole.h62
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/UserInputUtils.cpp87
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/UserInputUtils.h24
-rw-r--r--src/libs/7zip/win/CPP/Common/AutoPtr.h35
-rw-r--r--src/libs/7zip/win/CPP/Common/Buffer.h77
-rw-r--r--src/libs/7zip/win/CPP/Common/CRC.cpp7
-rw-r--r--src/libs/7zip/win/CPP/Common/C_FileIO.cpp88
-rw-r--r--src/libs/7zip/win/CPP/Common/C_FileIO.h47
-rw-r--r--src/libs/7zip/win/CPP/Common/ComTry.h17
-rw-r--r--src/libs/7zip/win/CPP/Common/CommandLineParser.cpp229
-rw-r--r--src/libs/7zip/win/CPP/Common/CommandLineParser.h72
-rw-r--r--src/libs/7zip/win/CPP/Common/Defs.h20
-rw-r--r--src/libs/7zip/win/CPP/Common/DynamicBuffer.h50
-rw-r--r--src/libs/7zip/win/CPP/Common/IntToString.cpp77
-rw-r--r--src/libs/7zip/win/CPP/Common/IntToString.h19
-rw-r--r--src/libs/7zip/win/CPP/Common/Lang.cpp130
-rw-r--r--src/libs/7zip/win/CPP/Common/Lang.h28
-rw-r--r--src/libs/7zip/win/CPP/Common/ListFileUtils.cpp75
-rw-r--r--src/libs/7zip/win/CPP/Common/ListFileUtils.h11
-rw-r--r--src/libs/7zip/win/CPP/Common/MyCom.h225
-rw-r--r--src/libs/7zip/win/CPP/Common/MyException.h14
-rw-r--r--src/libs/7zip/win/CPP/Common/MyGuidDef.h54
-rw-r--r--src/libs/7zip/win/CPP/Common/MyInitGuid.h22
-rw-r--r--src/libs/7zip/win/CPP/Common/MyMap.cpp140
-rw-r--r--src/libs/7zip/win/CPP/Common/MyMap.h28
-rw-r--r--src/libs/7zip/win/CPP/Common/MyString.cpp200
-rw-r--r--src/libs/7zip/win/CPP/Common/MyString.h627
-rw-r--r--src/libs/7zip/win/CPP/Common/MyUnknown.h13
-rw-r--r--src/libs/7zip/win/CPP/Common/MyVector.cpp87
-rw-r--r--src/libs/7zip/win/CPP/Common/MyVector.h266
-rw-r--r--src/libs/7zip/win/CPP/Common/MyWindows.cpp109
-rw-r--r--src/libs/7zip/win/CPP/Common/MyWindows.h204
-rw-r--r--src/libs/7zip/win/CPP/Common/MyXml.cpp209
-rw-r--r--src/libs/7zip/win/CPP/Common/MyXml.h40
-rw-r--r--src/libs/7zip/win/CPP/Common/NewHandler.cpp116
-rw-r--r--src/libs/7zip/win/CPP/Common/NewHandler.h16
-rw-r--r--src/libs/7zip/win/CPP/Common/Random.cpp26
-rw-r--r--src/libs/7zip/win/CPP/Common/Random.h16
-rw-r--r--src/libs/7zip/win/CPP/Common/StdAfx.h9
-rw-r--r--src/libs/7zip/win/CPP/Common/StdInStream.cpp107
-rw-r--r--src/libs/7zip/win/CPP/Common/StdInStream.h32
-rw-r--r--src/libs/7zip/win/CPP/Common/StdOutStream.cpp104
-rw-r--r--src/libs/7zip/win/CPP/Common/StdOutStream.h35
-rw-r--r--src/libs/7zip/win/CPP/Common/StringConvert.cpp97
-rw-r--r--src/libs/7zip/win/CPP/Common/StringConvert.h73
-rw-r--r--src/libs/7zip/win/CPP/Common/StringToInt.cpp90
-rw-r--r--src/libs/7zip/win/CPP/Common/StringToInt.h18
-rw-r--r--src/libs/7zip/win/CPP/Common/TextConfig.cpp138
-rw-r--r--src/libs/7zip/win/CPP/Common/TextConfig.h22
-rw-r--r--src/libs/7zip/win/CPP/Common/Types.h11
-rw-r--r--src/libs/7zip/win/CPP/Common/UTFConvert.cpp145
-rw-r--r--src/libs/7zip/win/CPP/Common/UTFConvert.h11
-rw-r--r--src/libs/7zip/win/CPP/Common/Wildcard.cpp462
-rw-r--r--src/libs/7zip/win/CPP/Common/Wildcard.h80
-rw-r--r--src/libs/7zip/win/CPP/Windows/COM.cpp37
-rw-r--r--src/libs/7zip/win/CPP/Windows/COM.h69
-rw-r--r--src/libs/7zip/win/CPP/Windows/Clipboard.cpp135
-rw-r--r--src/libs/7zip/win/CPP/Windows/Clipboard.h28
-rw-r--r--src/libs/7zip/win/CPP/Windows/CommonDialog.cpp184
-rw-r--r--src/libs/7zip/win/CPP/Windows/CommonDialog.h19
-rw-r--r--src/libs/7zip/win/CPP/Windows/Console.cpp10
-rw-r--r--src/libs/7zip/win/CPP/Windows/Console.h52
-rw-r--r--src/libs/7zip/win/CPP/Windows/DLL.cpp110
-rw-r--r--src/libs/7zip/win/CPP/Windows/DLL.h59
-rw-r--r--src/libs/7zip/win/CPP/Windows/Defs.h17
-rw-r--r--src/libs/7zip/win/CPP/Windows/Error.cpp50
-rw-r--r--src/libs/7zip/win/CPP/Windows/Error.h33
-rw-r--r--src/libs/7zip/win/CPP/Windows/FileDir.cpp909
-rw-r--r--src/libs/7zip/win/CPP/Windows/FileDir.h177
-rw-r--r--src/libs/7zip/win/CPP/Windows/FileFind.cpp462
-rw-r--r--src/libs/7zip/win/CPP/Windows/FileFind.h161
-rw-r--r--src/libs/7zip/win/CPP/Windows/FileIO.cpp434
-rw-r--r--src/libs/7zip/win/CPP/Windows/FileIO.h136
-rw-r--r--src/libs/7zip/win/CPP/Windows/FileMapping.cpp12
-rw-r--r--src/libs/7zip/win/CPP/Windows/FileMapping.h62
-rw-r--r--src/libs/7zip/win/CPP/Windows/FileName.cpp50
-rw-r--r--src/libs/7zip/win/CPP/Windows/FileName.h27
-rw-r--r--src/libs/7zip/win/CPP/Windows/FileSystem.cpp126
-rw-r--r--src/libs/7zip/win/CPP/Windows/FileSystem.h51
-rw-r--r--src/libs/7zip/win/CPP/Windows/Handle.h37
-rw-r--r--src/libs/7zip/win/CPP/Windows/Memory.cpp36
-rw-r--r--src/libs/7zip/win/CPP/Windows/Memory.h53
-rw-r--r--src/libs/7zip/win/CPP/Windows/MemoryLock.cpp82
-rw-r--r--src/libs/7zip/win/CPP/Windows/MemoryLock.h15
-rw-r--r--src/libs/7zip/win/CPP/Windows/Menu.cpp191
-rw-r--r--src/libs/7zip/win/CPP/Windows/Menu.h153
-rw-r--r--src/libs/7zip/win/CPP/Windows/NationalTime.cpp37
-rw-r--r--src/libs/7zip/win/CPP/Windows/NationalTime.h20
-rw-r--r--src/libs/7zip/win/CPP/Windows/Net.cpp380
-rw-r--r--src/libs/7zip/win/CPP/Windows/Net.h87
-rw-r--r--src/libs/7zip/win/CPP/Windows/NtCheck.h44
-rw-r--r--src/libs/7zip/win/CPP/Windows/Process.cpp81
-rw-r--r--src/libs/7zip/win/CPP/Windows/Process.h100
-rw-r--r--src/libs/7zip/win/CPP/Windows/ProcessMessages.cpp22
-rw-r--r--src/libs/7zip/win/CPP/Windows/ProcessMessages.h14
-rw-r--r--src/libs/7zip/win/CPP/Windows/PropVariant.cpp243
-rw-r--r--src/libs/7zip/win/CPP/Windows/PropVariant.h56
-rw-r--r--src/libs/7zip/win/CPP/Windows/PropVariantConversions.cpp105
-rw-r--r--src/libs/7zip/win/CPP/Windows/PropVariantConversions.h14
-rw-r--r--src/libs/7zip/win/CPP/Windows/PropVariantUtils.cpp78
-rw-r--r--src/libs/7zip/win/CPP/Windows/PropVariantUtils.h28
-rw-r--r--src/libs/7zip/win/CPP/Windows/Registry.cpp369
-rw-r--r--src/libs/7zip/win/CPP/Windows/Registry.h85
-rw-r--r--src/libs/7zip/win/CPP/Windows/ResourceString.cpp64
-rw-r--r--src/libs/7zip/win/CPP/Windows/ResourceString.h22
-rw-r--r--src/libs/7zip/win/CPP/Windows/Security.cpp179
-rw-r--r--src/libs/7zip/win/CPP/Windows/Security.h167
-rw-r--r--src/libs/7zip/win/CPP/Windows/Shell.cpp335
-rw-r--r--src/libs/7zip/win/CPP/Windows/Shell.h93
-rw-r--r--src/libs/7zip/win/CPP/Windows/StdAfx.h9
-rw-r--r--src/libs/7zip/win/CPP/Windows/Synchronization.cpp10
-rw-r--r--src/libs/7zip/win/CPP/Windows/Synchronization.h164
-rw-r--r--src/libs/7zip/win/CPP/Windows/System.cpp72
-rw-r--r--src/libs/7zip/win/CPP/Windows/System.h16
-rw-r--r--src/libs/7zip/win/CPP/Windows/Thread.h38
-rw-r--r--src/libs/7zip/win/CPP/Windows/Time.cpp170
-rw-r--r--src/libs/7zip/win/CPP/Windows/Time.h21
-rw-r--r--src/libs/7zip/win/CPP/Windows/Window.cpp169
-rw-r--r--src/libs/7zip/win/CPP/Windows/Window.h261
-rw-r--r--src/libs/7zip/win/DOC/7zC.txt194
-rw-r--r--src/libs/7zip/win/DOC/7zFormat.txt469
-rw-r--r--src/libs/7zip/win/DOC/License.txt52
-rw-r--r--src/libs/7zip/win/DOC/Methods.txt152
-rw-r--r--src/libs/7zip/win/DOC/copying.txt504
-rw-r--r--src/libs/7zip/win/DOC/history.txt456
-rw-r--r--src/libs/7zip/win/DOC/lzma.txt598
-rw-r--r--src/libs/7zip/win/DOC/readme.txt181
-rw-r--r--src/libs/7zip/win/DOC/unRarLicense.txt41
-rw-r--r--src/libs/7zip/win/installer_framework_changes.txt519
-rw-r--r--src/libs/7zip/win/win.pri272
-rw-r--r--src/libs/installer/addqtcreatorarrayvalueoperation.cpp171
-rw-r--r--src/libs/installer/addqtcreatorarrayvalueoperation.h54
-rw-r--r--src/libs/installer/adminauthorization.cpp48
-rw-r--r--src/libs/installer/adminauthorization.h83
-rw-r--r--src/libs/installer/adminauthorization_mac.cpp120
-rw-r--r--src/libs/installer/adminauthorization_win.cpp103
-rw-r--r--src/libs/installer/adminauthorization_x11.cpp252
-rw-r--r--src/libs/installer/binaryformat.cpp1115
-rw-r--r--src/libs/installer/binaryformat.h248
-rw-r--r--src/libs/installer/binaryformatengine.cpp297
-rw-r--r--src/libs/installer/binaryformatengine.h78
-rw-r--r--src/libs/installer/binaryformatenginehandler.cpp116
-rw-r--r--src/libs/installer/binaryformatenginehandler.h66
-rw-r--r--src/libs/installer/component.cpp1207
-rw-r--r--src/libs/installer/component.h233
-rw-r--r--src/libs/installer/component_p.cpp359
-rw-r--r--src/libs/installer/component_p.h157
-rw-r--r--src/libs/installer/componentmodel.cpp528
-rw-r--r--src/libs/installer/componentmodel.h115
-rw-r--r--src/libs/installer/constants.h82
-rw-r--r--src/libs/installer/copydirectoryoperation.cpp159
-rw-r--r--src/libs/installer/copydirectoryoperation.h61
-rw-r--r--src/libs/installer/createdesktopentryoperation.cpp204
-rw-r--r--src/libs/installer/createdesktopentryoperation.h57
-rw-r--r--src/libs/installer/createlocalrepositoryoperation.cpp384
-rw-r--r--src/libs/installer/createlocalrepositoryoperation.h68
-rw-r--r--src/libs/installer/createshortcutoperation.cpp219
-rw-r--r--src/libs/installer/createshortcutoperation.h54
-rw-r--r--src/libs/installer/downloadarchivesjob.cpp340
-rw-r--r--src/libs/installer/downloadarchivesjob.h104
-rw-r--r--src/libs/installer/elevatedexecuteoperation.cpp276
-rw-r--r--src/libs/installer/elevatedexecuteoperation.h70
-rw-r--r--src/libs/installer/environmentvariablesoperation.cpp230
-rw-r--r--src/libs/installer/environmentvariablesoperation.h54
-rw-r--r--src/libs/installer/errors.h59
-rw-r--r--src/libs/installer/extractarchiveoperation.cpp149
-rw-r--r--src/libs/installer/extractarchiveoperation.h70
-rw-r--r--src/libs/installer/extractarchiveoperation_p.h231
-rw-r--r--src/libs/installer/fakestopprocessforupdateoperation.cpp129
-rw-r--r--src/libs/installer/fakestopprocessforupdateoperation.h54
-rw-r--r--src/libs/installer/fileutils.cpp507
-rw-r--r--src/libs/installer/fileutils.h114
-rw-r--r--src/libs/installer/fsengineclient.cpp818
-rw-r--r--src/libs/installer/fsengineclient.h75
-rw-r--r--src/libs/installer/fsengineserver.cpp595
-rw-r--r--src/libs/installer/fsengineserver.h62
-rw-r--r--src/libs/installer/getrepositoriesmetainfojob.cpp195
-rw-r--r--src/libs/installer/getrepositoriesmetainfojob.h96
-rw-r--r--src/libs/installer/getrepositorymetainfojob.cpp512
-rw-r--r--src/libs/installer/getrepositorymetainfojob.h113
-rw-r--r--src/libs/installer/globalsettingsoperation.cpp123
-rw-r--r--src/libs/installer/globalsettingsoperation.h59
-rw-r--r--src/libs/installer/init.cpp244
-rw-r--r--src/libs/installer/init.h44
-rw-r--r--src/libs/installer/installer.pro179
-rw-r--r--src/libs/installer/installer_global.h41
-rw-r--r--src/libs/installer/installiconsoperation.cpp281
-rw-r--r--src/libs/installer/installiconsoperation.h64
-rw-r--r--src/libs/installer/lazyplaintextedit.cpp85
-rw-r--r--src/libs/installer/lazyplaintextedit.h55
-rw-r--r--src/libs/installer/lib7z_facade.cpp1372
-rw-r--r--src/libs/installer/lib7z_facade.h242
-rw-r--r--src/libs/installer/licenseoperation.cpp119
-rw-r--r--src/libs/installer/licenseoperation.h54
-rw-r--r--src/libs/installer/linereplaceoperation.cpp112
-rw-r--r--src/libs/installer/linereplaceoperation.h54
-rw-r--r--src/libs/installer/macrelocateqt.cpp94
-rw-r--r--src/libs/installer/macrelocateqt.h55
-rw-r--r--src/libs/installer/macreplaceinstallnamesoperation.cpp273
-rw-r--r--src/libs/installer/macreplaceinstallnamesoperation.h67
-rw-r--r--src/libs/installer/messageboxhandler.cpp309
-rw-r--r--src/libs/installer/messageboxhandler.h131
-rw-r--r--src/libs/installer/minimumprogressoperation.cpp68
-rw-r--r--src/libs/installer/minimumprogressoperation.h61
-rw-r--r--src/libs/installer/operationrunner.cpp165
-rw-r--r--src/libs/installer/operationrunner.h60
-rw-r--r--src/libs/installer/packagemanagercore.cpp1845
-rw-r--r--src/libs/installer/packagemanagercore.h308
-rw-r--r--src/libs/installer/packagemanagercore_p.cpp2326
-rw-r--r--src/libs/installer/packagemanagercore_p.h260
-rw-r--r--src/libs/installer/packagemanagergui.cpp1983
-rw-r--r--src/libs/installer/packagemanagergui.h418
-rw-r--r--src/libs/installer/packagemanagerproxyfactory.cpp79
-rw-r--r--src/libs/installer/packagemanagerproxyfactory.h56
-rw-r--r--src/libs/installer/performinstallationform.cpp189
-rw-r--r--src/libs/installer/performinstallationform.h87
-rw-r--r--src/libs/installer/persistentsettings.cpp212
-rw-r--r--src/libs/installer/persistentsettings.h75
-rw-r--r--src/libs/installer/progresscoordinator.cpp275
-rw-r--r--src/libs/installer/progresscoordinator.h96
-rw-r--r--src/libs/installer/projectexplorer_export.h1
-rw-r--r--src/libs/installer/qinstallerglobal.h92
-rw-r--r--src/libs/installer/qprocesswrapper.cpp413
-rw-r--r--src/libs/installer/qprocesswrapper.h127
-rw-r--r--src/libs/installer/qsettingswrapper.cpp366
-rw-r--r--src/libs/installer/qsettingswrapper.h107
-rw-r--r--src/libs/installer/qtcreator_constants.h77
-rw-r--r--src/libs/installer/qtcreatorpersistentsettings.cpp227
-rw-r--r--src/libs/installer/qtcreatorpersistentsettings.h79
-rw-r--r--src/libs/installer/qtpatch.cpp233
-rw-r--r--src/libs/installer/qtpatch.h60
-rw-r--r--src/libs/installer/qtpatchoperation.cpp343
-rw-r--r--src/libs/installer/qtpatchoperation.h54
-rw-r--r--src/libs/installer/range.h88
-rw-r--r--src/libs/installer/registerdefaultdebuggeroperation.cpp160
-rw-r--r--src/libs/installer/registerdefaultdebuggeroperation.h54
-rw-r--r--src/libs/installer/registerdocumentationoperation.cpp153
-rw-r--r--src/libs/installer/registerdocumentationoperation.h54
-rw-r--r--src/libs/installer/registerfiletypeoperation.cpp207
-rw-r--r--src/libs/installer/registerfiletypeoperation.h54
-rw-r--r--src/libs/installer/registerqtoperation.cpp224
-rw-r--r--src/libs/installer/registerqtoperation.h54
-rw-r--r--src/libs/installer/registerqtv23operation.cpp231
-rw-r--r--src/libs/installer/registerqtv23operation.h54
-rw-r--r--src/libs/installer/registerqtv2operation.cpp201
-rw-r--r--src/libs/installer/registerqtv2operation.h54
-rw-r--r--src/libs/installer/registertoolchainoperation.cpp178
-rw-r--r--src/libs/installer/registertoolchainoperation.h72
-rw-r--r--src/libs/installer/replaceoperation.cpp106
-rw-r--r--src/libs/installer/replaceoperation.h54
-rw-r--r--src/libs/installer/repository.cpp213
-rw-r--r--src/libs/installer/repository.h97
-rw-r--r--src/libs/installer/resources/files-to-patch-linux72
-rw-r--r--src/libs/installer/resources/files-to-patch-linux-emb-arm70
-rw-r--r--src/libs/installer/resources/files-to-patch-macx61
-rw-r--r--src/libs/installer/resources/files-to-patch-windows60
-rw-r--r--src/libs/installer/resources/patch_file_lists.qrc7
-rw-r--r--src/libs/installer/selfrestartoperation.cpp88
-rw-r--r--src/libs/installer/selfrestartoperation.h54
-rw-r--r--src/libs/installer/setdemospathonqtoperation.cpp126
-rw-r--r--src/libs/installer/setdemospathonqtoperation.h54
-rw-r--r--src/libs/installer/setexamplespathonqtoperation.cpp127
-rw-r--r--src/libs/installer/setexamplespathonqtoperation.h54
-rw-r--r--src/libs/installer/setimportspathonqtcoreoperation.cpp151
-rw-r--r--src/libs/installer/setimportspathonqtcoreoperation.h54
-rw-r--r--src/libs/installer/setpathonqtcoreoperation.cpp175
-rw-r--r--src/libs/installer/setpathonqtcoreoperation.h54
-rw-r--r--src/libs/installer/setpluginpathonqtcoreoperation.cpp149
-rw-r--r--src/libs/installer/setpluginpathonqtcoreoperation.h54
-rw-r--r--src/libs/installer/setqtcreatorvalueoperation.cpp137
-rw-r--r--src/libs/installer/setqtcreatorvalueoperation.h54
-rw-r--r--src/libs/installer/settings.cpp523
-rw-r--r--src/libs/installer/settings.h141
-rw-r--r--src/libs/installer/simplemovefileoperation.cpp113
-rw-r--r--src/libs/installer/simplemovefileoperation.h61
-rw-r--r--src/libs/installer/templates.cpp176
-rw-r--r--src/libs/installer/updatecreatorsettingsfrom21to22operation.cpp325
-rw-r--r--src/libs/installer/updatecreatorsettingsfrom21to22operation.h54
-rw-r--r--src/libs/installer/updater.cpp97
-rw-r--r--src/libs/installer/updater.h55
-rw-r--r--src/libs/installer/updatesettings.cpp164
-rw-r--r--src/libs/installer/updatesettings.h85
-rw-r--r--src/libs/installer/utils.cpp341
-rw-r--r--src/libs/installer/utils.h92
-rw-r--r--src/libs/installer/zipjob.cpp206
-rw-r--r--src/libs/installer/zipjob.h100
-rw-r--r--src/libs/kdtools/LICENSE.LGPL488
-rw-r--r--src/libs/kdtools/environment.cpp41
-rw-r--r--src/libs/kdtools/environment.h39
-rw-r--r--src/libs/kdtools/kdgenericfactory.cpp250
-rw-r--r--src/libs/kdtools/kdgenericfactory.h67
-rw-r--r--src/libs/kdtools/kdjob.cpp236
-rw-r--r--src/libs/kdtools/kdjob.h109
-rw-r--r--src/libs/kdtools/kdlockfile.cpp91
-rw-r--r--src/libs/kdtools/kdlockfile.h45
-rw-r--r--src/libs/kdtools/kdlockfile_p.h52
-rw-r--r--src/libs/kdtools/kdlockfile_unix.cpp77
-rw-r--r--src/libs/kdtools/kdlockfile_win.cpp68
-rw-r--r--src/libs/kdtools/kdrunoncechecker.cpp122
-rw-r--r--src/libs/kdtools/kdrunoncechecker.h45
-rw-r--r--src/libs/kdtools/kdsavefile.cpp521
-rw-r--r--src/libs/kdtools/kdsavefile.h84
-rw-r--r--src/libs/kdtools/kdselfrestarter.cpp87
-rw-r--r--src/libs/kdtools/kdselfrestarter.h43
-rw-r--r--src/libs/kdtools/kdsysinfo.cpp149
-rw-r--r--src/libs/kdtools/kdsysinfo.h83
-rw-r--r--src/libs/kdtools/kdsysinfo_mac.cpp134
-rw-r--r--src/libs/kdtools/kdsysinfo_win.cpp212
-rw-r--r--src/libs/kdtools/kdsysinfo_x11.cpp118
-rw-r--r--src/libs/kdtools/kdtools.pri60
-rw-r--r--src/libs/kdtools/kdtoolsglobal.h39
-rw-r--r--src/libs/kdtools/kdupdater.h52
-rw-r--r--src/libs/kdtools/kdupdaterapplication.cpp310
-rw-r--r--src/libs/kdtools/kdupdaterapplication.h87
-rw-r--r--src/libs/kdtools/kdupdaterfiledownloader.cpp1294
-rw-r--r--src/libs/kdtools/kdupdaterfiledownloader.h134
-rw-r--r--src/libs/kdtools/kdupdaterfiledownloader_p.h209
-rw-r--r--src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp112
-rw-r--r--src/libs/kdtools/kdupdaterfiledownloaderfactory.h79
-rw-r--r--src/libs/kdtools/kdupdaterpackagesinfo.cpp581
-rw-r--r--src/libs/kdtools/kdupdaterpackagesinfo.h123
-rw-r--r--src/libs/kdtools/kdupdatersignatureverificationrunnable.cpp137
-rw-r--r--src/libs/kdtools/kdupdatersignatureverificationrunnable.h92
-rw-r--r--src/libs/kdtools/kdupdatertask.cpp431
-rw-r--r--src/libs/kdtools/kdupdatertask.h108
-rw-r--r--src/libs/kdtools/kdupdaterupdate.cpp311
-rw-r--r--src/libs/kdtools/kdupdaterupdate.h89
-rw-r--r--src/libs/kdtools/kdupdaterupdatefinder.cpp842
-rw-r--r--src/libs/kdtools/kdupdaterupdatefinder.h74
-rw-r--r--src/libs/kdtools/kdupdaterupdateoperation.cpp388
-rw-r--r--src/libs/kdtools/kdupdaterupdateoperation.h97
-rw-r--r--src/libs/kdtools/kdupdaterupdateoperationfactory.cpp74
-rw-r--r--src/libs/kdtools/kdupdaterupdateoperationfactory.h55
-rw-r--r--src/libs/kdtools/kdupdaterupdateoperations.cpp1058
-rw-r--r--src/libs/kdtools/kdupdaterupdateoperations.h177
-rw-r--r--src/libs/kdtools/kdupdaterupdatesinfo.cpp352
-rw-r--r--src/libs/kdtools/kdupdaterupdatesinfo_p.h101
-rw-r--r--src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp500
-rw-r--r--src/libs/kdtools/kdupdaterupdatesourcesinfo.h114
-rw-r--r--src/libs/libs.pro3
-rw-r--r--src/sdk/installerbase.cpp396
-rw-r--r--src/sdk/installerbase.exe.manifest14
-rw-r--r--src/sdk/installerbase.icobin0 -> 25214 bytes
-rw-r--r--src/sdk/installerbase.qrc7
-rw-r--r--src/sdk/installerbase.rc7
-rw-r--r--src/sdk/installerbase_p.cpp428
-rw-r--r--src/sdk/installerbase_p.h101
-rw-r--r--src/sdk/installerbasecommons.cpp549
-rw-r--r--src/sdk/installerbasecommons.h147
-rw-r--r--src/sdk/sdk.pro51
-rw-r--r--src/sdk/settingsdialog.cpp535
-rw-r--r--src/sdk/settingsdialog.h172
-rw-r--r--src/sdk/settingsdialog.ui767
-rw-r--r--src/sdk/tabcontroller.cpp203
-rw-r--r--src/sdk/tabcontroller.h76
-rw-r--r--src/sdk/translations/de_de.ts3681
-rw-r--r--src/sdk/translations/en_us.ts3331
-rw-r--r--src/sdk/translations/sv_se.ts3384
-rw-r--r--src/src.pro4
1555 files changed, 305866 insertions, 0 deletions
diff --git a/src/libs/7zip/7zip.pri b/src/libs/7zip/7zip.pri
new file mode 100644
index 000000000..1aa92d294
--- /dev/null
+++ b/src/libs/7zip/7zip.pri
@@ -0,0 +1,4 @@
+7ZIP_BASE=$$PWD
+
+win32:include($$7ZIP_BASE/win/win.pri) #this is 7zip
+unix:include($$7ZIP_BASE/unix/unix.pri) #this is p7zip
diff --git a/src/libs/7zip/unix/C/7zBuf.h b/src/libs/7zip/unix/C/7zBuf.h
new file mode 100644
index 000000000..e9f2f316d
--- /dev/null
+++ b/src/libs/7zip/unix/C/7zBuf.h
@@ -0,0 +1,39 @@
+/* 7zBuf.h -- Byte Buffer
+2009-02-07 : Igor Pavlov : Public domain */
+
+#ifndef __7Z_BUF_H
+#define __7Z_BUF_H
+
+#include "Types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct
+{
+ Byte *data;
+ size_t size;
+} CBuf;
+
+void Buf_Init(CBuf *p);
+int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc);
+void Buf_Free(CBuf *p, ISzAlloc *alloc);
+
+typedef struct
+{
+ Byte *data;
+ size_t size;
+ size_t pos;
+} CDynBuf;
+
+void DynBuf_Construct(CDynBuf *p);
+void DynBuf_SeekToBeg(CDynBuf *p);
+int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc);
+void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/libs/7zip/unix/C/7zBuf2.c b/src/libs/7zip/unix/C/7zBuf2.c
new file mode 100644
index 000000000..8d17e0dcf
--- /dev/null
+++ b/src/libs/7zip/unix/C/7zBuf2.c
@@ -0,0 +1,45 @@
+/* 7zBuf2.c -- Byte Buffer
+2008-10-04 : Igor Pavlov : Public domain */
+
+#include <string.h>
+#include "7zBuf.h"
+
+void DynBuf_Construct(CDynBuf *p)
+{
+ p->data = 0;
+ p->size = 0;
+ p->pos = 0;
+}
+
+void DynBuf_SeekToBeg(CDynBuf *p)
+{
+ p->pos = 0;
+}
+
+int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc)
+{
+ if (size > p->size - p->pos)
+ {
+ size_t newSize = p->pos + size;
+ Byte *data;
+ newSize += newSize / 4;
+ data = (Byte *)alloc->Alloc(alloc, newSize);
+ if (data == 0)
+ return 0;
+ p->size = newSize;
+ memcpy(data, p->data, p->pos);
+ alloc->Free(alloc, p->data);
+ p->data = data;
+ }
+ memcpy(p->data + p->pos, buf, size);
+ p->pos += size;
+ return 1;
+}
+
+void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc)
+{
+ alloc->Free(alloc, p->data);
+ p->data = 0;
+ p->size = 0;
+ p->pos = 0;
+}
diff --git a/src/libs/7zip/unix/C/7zCrc.c b/src/libs/7zip/unix/C/7zCrc.c
new file mode 100644
index 000000000..404090ef3
--- /dev/null
+++ b/src/libs/7zip/unix/C/7zCrc.c
@@ -0,0 +1,76 @@
+/* 7zCrc.c -- CRC32 calculation
+2009-11-23 : Igor Pavlov : Public domain */
+
+#include "7zCrc.h"
+#include "CpuArch.h"
+
+#define kCrcPoly 0xEDB88320
+
+#ifdef MY_CPU_LE
+#define CRC_NUM_TABLES 8
+#else
+#define CRC_NUM_TABLES 1
+#endif
+
+typedef UInt32 (MY_FAST_CALL *CRC_FUNC)(UInt32 v, const void *data, size_t size, const UInt32 *table);
+
+static CRC_FUNC g_CrcUpdate;
+UInt32 g_CrcTable[256 * CRC_NUM_TABLES];
+
+#if CRC_NUM_TABLES == 1
+
+#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8))
+
+static UInt32 MY_FAST_CALL CrcUpdateT1(UInt32 v, const void *data, size_t size, const UInt32 *table)
+{
+ const Byte *p = (const Byte *)data;
+ for (; size > 0; size--, p++)
+ v = CRC_UPDATE_BYTE_2(v, *p);
+ return v;
+}
+
+#else
+
+UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table);
+UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table);
+
+#endif
+
+UInt32 MY_FAST_CALL CrcUpdate(UInt32 v, const void *data, size_t size)
+{
+ return g_CrcUpdate(v, data, size, g_CrcTable);
+}
+
+UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size)
+{
+ return g_CrcUpdate(CRC_INIT_VAL, data, size, g_CrcTable) ^ CRC_INIT_VAL;
+}
+
+void MY_FAST_CALL CrcGenerateTable()
+{
+ UInt32 i;
+ for (i = 0; i < 256; i++)
+ {
+ UInt32 r = i;
+ unsigned j;
+ for (j = 0; j < 8; j++)
+ r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1));
+ g_CrcTable[i] = r;
+ }
+ #if CRC_NUM_TABLES == 1
+ g_CrcUpdate = CrcUpdateT1;
+ #else
+ for (; i < 256 * CRC_NUM_TABLES; i++)
+ {
+ UInt32 r = g_CrcTable[i - 256];
+ g_CrcTable[i] = g_CrcTable[r & 0xFF] ^ (r >> 8);
+ }
+ g_CrcUpdate = CrcUpdateT4;
+/* FIXME
+ #ifdef MY_CPU_X86_OR_AMD64
+ if (!CPU_Is_InOrder())
+ g_CrcUpdate = CrcUpdateT8;
+ #endif
+*/
+ #endif
+}
diff --git a/src/libs/7zip/unix/C/7zCrc.h b/src/libs/7zip/unix/C/7zCrc.h
new file mode 100644
index 000000000..38e3e5fbc
--- /dev/null
+++ b/src/libs/7zip/unix/C/7zCrc.h
@@ -0,0 +1,25 @@
+/* 7zCrc.h -- CRC32 calculation
+2009-11-21 : Igor Pavlov : Public domain */
+
+#ifndef __7Z_CRC_H
+#define __7Z_CRC_H
+
+#include "Types.h"
+
+EXTERN_C_BEGIN
+
+extern UInt32 g_CrcTable[];
+
+/* Call CrcGenerateTable one time before other CRC functions */
+void MY_FAST_CALL CrcGenerateTable(void);
+
+#define CRC_INIT_VAL 0xFFFFFFFF
+#define CRC_GET_DIGEST(crc) ((crc) ^ CRC_INIT_VAL)
+#define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8))
+
+UInt32 MY_FAST_CALL CrcUpdate(UInt32 crc, const void *data, size_t size);
+UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size);
+
+EXTERN_C_END
+
+#endif
diff --git a/src/libs/7zip/unix/C/7zCrcOpt.c b/src/libs/7zip/unix/C/7zCrcOpt.c
new file mode 100644
index 000000000..6c766a209
--- /dev/null
+++ b/src/libs/7zip/unix/C/7zCrcOpt.c
@@ -0,0 +1,34 @@
+/* 7zCrcOpt.c -- CRC32 calculation : optimized version
+2009-11-23 : Igor Pavlov : Public domain */
+
+#include "CpuArch.h"
+
+#ifdef MY_CPU_LE
+
+#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8))
+
+UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table)
+{
+ const Byte *p = (const Byte *)data;
+ for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++)
+ v = CRC_UPDATE_BYTE_2(v, *p);
+ for (; size >= 4; size -= 4, p += 4)
+ {
+ v ^= *(const UInt32 *)p;
+ v =
+ table[0x300 + (v & 0xFF)] ^
+ table[0x200 + ((v >> 8) & 0xFF)] ^
+ table[0x100 + ((v >> 16) & 0xFF)] ^
+ table[0x000 + ((v >> 24))];
+ }
+ for (; size > 0; size--, p++)
+ v = CRC_UPDATE_BYTE_2(v, *p);
+ return v;
+}
+
+UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table)
+{
+ return CrcUpdateT4(v, data, size, table);
+}
+
+#endif
diff --git a/src/libs/7zip/unix/C/7zCrcT8.c b/src/libs/7zip/unix/C/7zCrcT8.c
new file mode 100644
index 000000000..cd80e262b
--- /dev/null
+++ b/src/libs/7zip/unix/C/7zCrcT8.c
@@ -0,0 +1,43 @@
+/* 7zCrcT8.c -- CRC32 calculation with 8 tables
+2008-03-19
+Igor Pavlov
+Public domain */
+
+#include "7zCrc.h"
+
+#define kCrcPoly 0xEDB88320
+#define CRC_NUM_TABLES 8
+
+UInt32 g_CrcTable[256 * CRC_NUM_TABLES];
+
+void MY_FAST_CALL CrcGenerateTable()
+{
+ UInt32 i;
+ for (i = 0; i < 256; i++)
+ {
+ UInt32 r = i;
+ int j;
+ for (j = 0; j < 8; j++)
+ r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1));
+ g_CrcTable[i] = r;
+ }
+ #if CRC_NUM_TABLES > 1
+ for (; i < 256 * CRC_NUM_TABLES; i++)
+ {
+ UInt32 r = g_CrcTable[i - 256];
+ g_CrcTable[i] = g_CrcTable[r & 0xFF] ^ (r >> 8);
+ }
+ #endif
+}
+
+UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table);
+
+UInt32 MY_FAST_CALL CrcUpdate(UInt32 v, const void *data, size_t size)
+{
+ return CrcUpdateT8(v, data, size, g_CrcTable);
+}
+
+UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size)
+{
+ return CrcUpdateT8(CRC_INIT_VAL, data, size, g_CrcTable) ^ 0xFFFFFFFF;
+}
diff --git a/src/libs/7zip/unix/C/7zStream.c b/src/libs/7zip/unix/C/7zStream.c
new file mode 100644
index 000000000..0ebb7b5f9
--- /dev/null
+++ b/src/libs/7zip/unix/C/7zStream.c
@@ -0,0 +1,169 @@
+/* 7zStream.c -- 7z Stream functions
+2010-03-11 : Igor Pavlov : Public domain */
+
+#include <string.h>
+
+#include "Types.h"
+
+SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType)
+{
+ while (size != 0)
+ {
+ size_t processed = size;
+ RINOK(stream->Read(stream, buf, &processed));
+ if (processed == 0)
+ return errorType;
+ buf = (void *)((Byte *)buf + processed);
+ size -= processed;
+ }
+ return SZ_OK;
+}
+
+SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size)
+{
+ return SeqInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF);
+}
+
+SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf)
+{
+ size_t processed = 1;
+ RINOK(stream->Read(stream, buf, &processed));
+ return (processed == 1) ? SZ_OK : SZ_ERROR_INPUT_EOF;
+}
+
+SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset)
+{
+ Int64 t = offset;
+ return stream->Seek(stream, &t, SZ_SEEK_SET);
+}
+
+SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size)
+{
+ const void *lookBuf;
+ if (*size == 0)
+ return SZ_OK;
+ RINOK(stream->Look(stream, &lookBuf, size));
+ memcpy(buf, lookBuf, *size);
+ return stream->Skip(stream, *size);
+}
+
+SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType)
+{
+ while (size != 0)
+ {
+ size_t processed = size;
+ RINOK(stream->Read(stream, buf, &processed));
+ if (processed == 0)
+ return errorType;
+ buf = (void *)((Byte *)buf + processed);
+ size -= processed;
+ }
+ return SZ_OK;
+}
+
+SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size)
+{
+ return LookInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF);
+}
+
+static SRes LookToRead_Look_Lookahead(void *pp, const void **buf, size_t *size)
+{
+ SRes res = SZ_OK;
+ CLookToRead *p = (CLookToRead *)pp;
+ size_t size2 = p->size - p->pos;
+ if (size2 == 0 && *size > 0)
+ {
+ p->pos = 0;
+ size2 = LookToRead_BUF_SIZE;
+ res = p->realStream->Read(p->realStream, p->buf, &size2);
+ p->size = size2;
+ }
+ if (size2 < *size)
+ *size = size2;
+ *buf = p->buf + p->pos;
+ return res;
+}
+
+static SRes LookToRead_Look_Exact(void *pp, const void **buf, size_t *size)
+{
+ SRes res = SZ_OK;
+ CLookToRead *p = (CLookToRead *)pp;
+ size_t size2 = p->size - p->pos;
+ if (size2 == 0 && *size > 0)
+ {
+ p->pos = 0;
+ if (*size > LookToRead_BUF_SIZE)
+ *size = LookToRead_BUF_SIZE;
+ res = p->realStream->Read(p->realStream, p->buf, size);
+ size2 = p->size = *size;
+ }
+ if (size2 < *size)
+ *size = size2;
+ *buf = p->buf + p->pos;
+ return res;
+}
+
+static SRes LookToRead_Skip(void *pp, size_t offset)
+{
+ CLookToRead *p = (CLookToRead *)pp;
+ p->pos += offset;
+ return SZ_OK;
+}
+
+static SRes LookToRead_Read(void *pp, void *buf, size_t *size)
+{
+ CLookToRead *p = (CLookToRead *)pp;
+ size_t rem = p->size - p->pos;
+ if (rem == 0)
+ return p->realStream->Read(p->realStream, buf, size);
+ if (rem > *size)
+ rem = *size;
+ memcpy(buf, p->buf + p->pos, rem);
+ p->pos += rem;
+ *size = rem;
+ return SZ_OK;
+}
+
+static SRes LookToRead_Seek(void *pp, Int64 *pos, ESzSeek origin)
+{
+ CLookToRead *p = (CLookToRead *)pp;
+ p->pos = p->size = 0;
+ return p->realStream->Seek(p->realStream, pos, origin);
+}
+
+void LookToRead_CreateVTable(CLookToRead *p, int lookahead)
+{
+ p->s.Look = lookahead ?
+ LookToRead_Look_Lookahead :
+ LookToRead_Look_Exact;
+ p->s.Skip = LookToRead_Skip;
+ p->s.Read = LookToRead_Read;
+ p->s.Seek = LookToRead_Seek;
+}
+
+void LookToRead_Init(CLookToRead *p)
+{
+ p->pos = p->size = 0;
+}
+
+static SRes SecToLook_Read(void *pp, void *buf, size_t *size)
+{
+ CSecToLook *p = (CSecToLook *)pp;
+ return LookInStream_LookRead(p->realStream, buf, size);
+}
+
+void SecToLook_CreateVTable(CSecToLook *p)
+{
+ p->s.Read = SecToLook_Read;
+}
+
+static SRes SecToRead_Read(void *pp, void *buf, size_t *size)
+{
+ CSecToRead *p = (CSecToRead *)pp;
+ return p->realStream->Read(p->realStream, buf, size);
+}
+
+void SecToRead_CreateVTable(CSecToRead *p)
+{
+ p->s.Read = SecToRead_Read;
+}
diff --git a/src/libs/7zip/unix/C/7zVersion.h b/src/libs/7zip/unix/C/7zVersion.h
new file mode 100644
index 000000000..9d99c5dff
--- /dev/null
+++ b/src/libs/7zip/unix/C/7zVersion.h
@@ -0,0 +1,7 @@
+#define MY_VER_MAJOR 9
+#define MY_VER_MINOR 20
+#define MY_VER_BUILD 0
+#define MY_VERSION "9.20"
+#define MY_DATE "2010-11-18"
+#define MY_COPYRIGHT ": Igor Pavlov : Public domain"
+#define MY_VERSION_COPYRIGHT_DATE MY_VERSION " " MY_COPYRIGHT " : " MY_DATE
diff --git a/src/libs/7zip/unix/C/Aes.c b/src/libs/7zip/unix/C/Aes.c
new file mode 100644
index 000000000..1bb658793
--- /dev/null
+++ b/src/libs/7zip/unix/C/Aes.c
@@ -0,0 +1,284 @@
+/* Aes.c -- AES encryption / decryption
+2009-11-23 : Igor Pavlov : Public domain */
+
+#include "Aes.h"
+#include "CpuArch.h"
+
+static UInt32 T[256 * 4];
+static Byte Sbox[256] = {
+ 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
+ 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
+ 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
+ 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75,
+ 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84,
+ 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,
+ 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8,
+ 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2,
+ 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,
+ 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb,
+ 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79,
+ 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,
+ 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a,
+ 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e,
+ 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,
+ 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16};
+
+void MY_FAST_CALL AesCbc_Encode(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCbc_Decode(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCtr_Code(UInt32 *ivAes, Byte *data, size_t numBlocks);
+
+void MY_FAST_CALL AesCbc_Encode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCbc_Decode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks);
+void MY_FAST_CALL AesCtr_Code_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks);
+
+AES_CODE_FUNC g_AesCbc_Encode;
+AES_CODE_FUNC g_AesCbc_Decode;
+AES_CODE_FUNC g_AesCtr_Code;
+
+static UInt32 D[256 * 4];
+static Byte InvS[256];
+
+static Byte Rcon[11] = { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36 };
+
+#define xtime(x) ((((x) << 1) ^ (((x) & 0x80) != 0 ? 0x1B : 0)) & 0xFF)
+
+#define Ui32(a0, a1, a2, a3) ((UInt32)(a0) | ((UInt32)(a1) << 8) | ((UInt32)(a2) << 16) | ((UInt32)(a3) << 24))
+
+#define gb0(x) ( (x) & 0xFF)
+#define gb1(x) (((x) >> ( 8)) & 0xFF)
+#define gb2(x) (((x) >> (16)) & 0xFF)
+#define gb3(x) (((x) >> (24)) & 0xFF)
+
+void AesGenTables(void)
+{
+ unsigned i;
+ for (i = 0; i < 256; i++)
+ InvS[Sbox[i]] = (Byte)i;
+ for (i = 0; i < 256; i++)
+ {
+ {
+ UInt32 a1 = Sbox[i];
+ UInt32 a2 = xtime(a1);
+ UInt32 a3 = a2 ^ a1;
+ T[ i] = Ui32(a2, a1, a1, a3);
+ T[0x100 + i] = Ui32(a3, a2, a1, a1);
+ T[0x200 + i] = Ui32(a1, a3, a2, a1);
+ T[0x300 + i] = Ui32(a1, a1, a3, a2);
+ }
+ {
+ UInt32 a1 = InvS[i];
+ UInt32 a2 = xtime(a1);
+ UInt32 a4 = xtime(a2);
+ UInt32 a8 = xtime(a4);
+ UInt32 a9 = a8 ^ a1;
+ UInt32 aB = a8 ^ a2 ^ a1;
+ UInt32 aD = a8 ^ a4 ^ a1;
+ UInt32 aE = a8 ^ a4 ^ a2;
+ D[ i] = Ui32(aE, a9, aD, aB);
+ D[0x100 + i] = Ui32(aB, aE, a9, aD);
+ D[0x200 + i] = Ui32(aD, aB, aE, a9);
+ D[0x300 + i] = Ui32(a9, aD, aB, aE);
+ }
+ }
+ g_AesCbc_Encode = AesCbc_Encode;
+ g_AesCbc_Decode = AesCbc_Decode;
+ g_AesCtr_Code = AesCtr_Code;
+/* FIXME
+ #ifdef MY_CPU_X86_OR_AMD64
+ if (CPU_Is_Aes_Supported())
+ {
+ g_AesCbc_Encode = AesCbc_Encode_Intel;
+ g_AesCbc_Decode = AesCbc_Decode_Intel;
+ g_AesCtr_Code = AesCtr_Code_Intel;
+ }
+ #endif
+*/
+}
+
+#define HT(i, x, s) (T + (x << 8))[gb ## x(s[(i + x) & 3])]
+#define HT4(m, i, s, p) m[i] = \
+ HT(i, 0, s) ^ \
+ HT(i, 1, s) ^ \
+ HT(i, 2, s) ^ \
+ HT(i, 3, s) ^ w[p + i]
+/* such order (2031) in HT16 is for VC6/K8 speed optimization) */
+#define HT16(m, s, p) \
+ HT4(m, 2, s, p); \
+ HT4(m, 0, s, p); \
+ HT4(m, 3, s, p); \
+ HT4(m, 1, s, p); \
+
+#define FT(i, x) Sbox[gb ## x(m[(i + x) & 3])]
+#define FT4(i) dest[i] = Ui32(FT(i, 0), FT(i, 1), FT(i, 2), FT(i, 3)) ^ w[i];
+
+#define HD(i, x, s) (D + (x << 8))[gb ## x(s[(i - x) & 3])]
+#define HD4(m, i, s, p) m[i] = \
+ HD(i, 0, s) ^ \
+ HD(i, 1, s) ^ \
+ HD(i, 2, s) ^ \
+ HD(i, 3, s) ^ w[p + i];
+/* such order (0231) in HD16 is for VC6/K8 speed optimization) */
+#define HD16(m, s, p) \
+ HD4(m, 0, s, p); \
+ HD4(m, 2, s, p); \
+ HD4(m, 3, s, p); \
+ HD4(m, 1, s, p); \
+
+#define FD(i, x) InvS[gb ## x(m[(i - x) & 3])]
+#define FD4(i) dest[i] = Ui32(FD(i, 0), FD(i, 1), FD(i, 2), FD(i, 3)) ^ w[i];
+
+void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *w, const Byte *key, unsigned keySize)
+{
+ unsigned i, wSize;
+ wSize = keySize + 28;
+ keySize /= 4;
+ w[0] = ((UInt32)keySize / 2) + 3;
+ w += 4;
+
+ for (i = 0; i < keySize; i++, key += 4)
+ w[i] = GetUi32(key);
+
+ for (; i < wSize; i++)
+ {
+ UInt32 t = w[i - 1];
+ unsigned rem = i % keySize;
+ if (rem == 0)
+ t = Ui32(Sbox[gb1(t)] ^ Rcon[i / keySize], Sbox[gb2(t)], Sbox[gb3(t)], Sbox[gb0(t)]);
+ else if (keySize > 6 && rem == 4)
+ t = Ui32(Sbox[gb0(t)], Sbox[gb1(t)], Sbox[gb2(t)], Sbox[gb3(t)]);
+ w[i] = w[i - keySize] ^ t;
+ }
+}
+
+void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *w, const Byte *key, unsigned keySize)
+{
+ unsigned i, num;
+ Aes_SetKey_Enc(w, key, keySize);
+ num = keySize + 20;
+ w += 8;
+ for (i = 0; i < num; i++)
+ {
+ UInt32 r = w[i];
+ w[i] =
+ D[ Sbox[gb0(r)]] ^
+ D[0x100 + Sbox[gb1(r)]] ^
+ D[0x200 + Sbox[gb2(r)]] ^
+ D[0x300 + Sbox[gb3(r)]];
+ }
+}
+
+/* Aes_Encode and Aes_Decode functions work with little-endian words.
+ src and dest are pointers to 4 UInt32 words.
+ arc and dest can point to same block */
+
+static void Aes_Encode(const UInt32 *w, UInt32 *dest, const UInt32 *src)
+{
+ UInt32 s[4];
+ UInt32 m[4];
+ UInt32 numRounds2 = w[0];
+ w += 4;
+ s[0] = src[0] ^ w[0];
+ s[1] = src[1] ^ w[1];
+ s[2] = src[2] ^ w[2];
+ s[3] = src[3] ^ w[3];
+ w += 4;
+ for (;;)
+ {
+ HT16(m, s, 0);
+ if (--numRounds2 == 0)
+ break;
+ HT16(s, m, 4);
+ w += 8;
+ }
+ w += 4;
+ FT4(0); FT4(1); FT4(2); FT4(3);
+}
+
+static void Aes_Decode(const UInt32 *w, UInt32 *dest, const UInt32 *src)
+{
+ UInt32 s[4];
+ UInt32 m[4];
+ UInt32 numRounds2 = w[0];
+ w += 4 + numRounds2 * 8;
+ s[0] = src[0] ^ w[0];
+ s[1] = src[1] ^ w[1];
+ s[2] = src[2] ^ w[2];
+ s[3] = src[3] ^ w[3];
+ for (;;)
+ {
+ w -= 8;
+ HD16(m, s, 4);
+ if (--numRounds2 == 0)
+ break;
+ HD16(s, m, 0);
+ }
+ FD4(0); FD4(1); FD4(2); FD4(3);
+}
+
+void AesCbc_Init(UInt32 *p, const Byte *iv)
+{
+ unsigned i;
+ for (i = 0; i < 4; i++)
+ p[i] = GetUi32(iv + i * 4);
+}
+
+void MY_FAST_CALL AesCbc_Encode(UInt32 *p, Byte *data, size_t numBlocks)
+{
+ for (; numBlocks != 0; numBlocks--, data += AES_BLOCK_SIZE)
+ {
+ p[0] ^= GetUi32(data);
+ p[1] ^= GetUi32(data + 4);
+ p[2] ^= GetUi32(data + 8);
+ p[3] ^= GetUi32(data + 12);
+
+ Aes_Encode(p + 4, p, p);
+
+ SetUi32(data, p[0]);
+ SetUi32(data + 4, p[1]);
+ SetUi32(data + 8, p[2]);
+ SetUi32(data + 12, p[3]);
+ }
+}
+
+void MY_FAST_CALL AesCbc_Decode(UInt32 *p, Byte *data, size_t numBlocks)
+{
+ UInt32 in[4], out[4];
+ for (; numBlocks != 0; numBlocks--, data += AES_BLOCK_SIZE)
+ {
+ in[0] = GetUi32(data);
+ in[1] = GetUi32(data + 4);
+ in[2] = GetUi32(data + 8);
+ in[3] = GetUi32(data + 12);
+
+ Aes_Decode(p + 4, out, in);
+
+ SetUi32(data, p[0] ^ out[0]);
+ SetUi32(data + 4, p[1] ^ out[1]);
+ SetUi32(data + 8, p[2] ^ out[2]);
+ SetUi32(data + 12, p[3] ^ out[3]);
+
+ p[0] = in[0];
+ p[1] = in[1];
+ p[2] = in[2];
+ p[3] = in[3];
+ }
+}
+
+void MY_FAST_CALL AesCtr_Code(UInt32 *p, Byte *data, size_t numBlocks)
+{
+ for (; numBlocks != 0; numBlocks--)
+ {
+ UInt32 temp[4];
+ Byte buf[16];
+ int i;
+ if (++p[0] == 0)
+ p[1]++;
+ Aes_Encode(p + 4, temp, p);
+ SetUi32(buf, temp[0]);
+ SetUi32(buf + 4, temp[1]);
+ SetUi32(buf + 8, temp[2]);
+ SetUi32(buf + 12, temp[3]);
+ for (i = 0; i < 16; i++)
+ *data++ ^= buf[i];
+ }
+}
diff --git a/src/libs/7zip/unix/C/Aes.h b/src/libs/7zip/unix/C/Aes.h
new file mode 100644
index 000000000..c9b0677c8
--- /dev/null
+++ b/src/libs/7zip/unix/C/Aes.h
@@ -0,0 +1,38 @@
+/* Aes.h -- AES encryption / decryption
+2009-11-23 : Igor Pavlov : Public domain */
+
+#ifndef __AES_H
+#define __AES_H
+
+#include "Types.h"
+
+EXTERN_C_BEGIN
+
+#define AES_BLOCK_SIZE 16
+
+/* Call AesGenTables one time before other AES functions */
+void AesGenTables(void);
+
+/* UInt32 pointers must be 16-byte aligned */
+
+/* 16-byte (4 * 32-bit words) blocks: 1 (IV) + 1 (keyMode) + 15 (AES-256 roundKeys) */
+#define AES_NUM_IVMRK_WORDS ((1 + 1 + 15) * 4)
+
+/* aes - 16-byte aligned pointer to keyMode+roundKeys sequence */
+/* keySize = 16 or 24 or 32 (bytes) */
+typedef void (MY_FAST_CALL *AES_SET_KEY_FUNC)(UInt32 *aes, const Byte *key, unsigned keySize);
+void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *aes, const Byte *key, unsigned keySize);
+void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *aes, const Byte *key, unsigned keySize);
+
+/* ivAes - 16-byte aligned pointer to iv+keyMode+roundKeys sequence: UInt32[AES_NUM_IVMRK_WORDS] */
+void AesCbc_Init(UInt32 *ivAes, const Byte *iv); /* iv size is AES_BLOCK_SIZE */
+/* data - 16-byte aligned pointer to data */
+/* numBlocks - the number of 16-byte blocks in data array */
+typedef void (MY_FAST_CALL *AES_CODE_FUNC)(UInt32 *ivAes, Byte *data, size_t numBlocks);
+extern AES_CODE_FUNC g_AesCbc_Encode;
+extern AES_CODE_FUNC g_AesCbc_Decode;
+extern AES_CODE_FUNC g_AesCtr_Code;
+
+EXTERN_C_END
+
+#endif
diff --git a/src/libs/7zip/unix/C/Alloc.c b/src/libs/7zip/unix/C/Alloc.c
new file mode 100644
index 000000000..be02a9299
--- /dev/null
+++ b/src/libs/7zip/unix/C/Alloc.c
@@ -0,0 +1,280 @@
+/* Alloc.c -- Memory allocation functions
+2008-09-24
+Igor Pavlov
+Public domain */
+
+#ifdef _WIN32
+#include <windows.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef _7ZIP_LARGE_PAGES
+#ifdef __linux__
+#ifndef _7ZIP_ST
+#include <pthread.h>
+#endif
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <mntent.h>
+#endif
+#endif
+
+#include "Alloc.h"
+
+/* #define _SZ_ALLOC_DEBUG */
+
+/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */
+#ifdef _SZ_ALLOC_DEBUG
+#include <stdio.h>
+int g_allocCount = 0;
+int g_allocCountMid = 0;
+int g_allocCountBig = 0;
+#endif
+
+void *MyAlloc(size_t size)
+{
+ if (size == 0)
+ return 0;
+ #ifdef _SZ_ALLOC_DEBUG
+ {
+ void *p = malloc(size);
+ fprintf(stderr, "\nAlloc %10d bytes, count = %10d, addr = %8X", size, g_allocCount++, (unsigned)p);
+ return p;
+ }
+ #else
+ return malloc(size);
+ #endif
+}
+
+void MyFree(void *address)
+{
+ #ifdef _SZ_ALLOC_DEBUG
+ if (address != 0)
+ fprintf(stderr, "\nFree; count = %10d, addr = %8X", --g_allocCount, (unsigned)address);
+ #endif
+ free(address);
+}
+
+#ifndef _WIN32
+
+#ifdef _7ZIP_LARGE_PAGES
+
+#ifdef __linux__
+#define _7ZIP_MAX_HUGE_ALLOCS 64
+static void *g_HugePageAddr[_7ZIP_MAX_HUGE_ALLOCS] = { NULL };
+static size_t g_HugePageLen[_7ZIP_MAX_HUGE_ALLOCS];
+static char *g_HugetlbPath;
+#endif
+
+#endif
+
+static void *VirtualAlloc(size_t size, int memLargePages)
+{
+ #ifdef _7ZIP_LARGE_PAGES
+ if (memLargePages)
+ {
+ #ifdef __linux__
+ /* huge pages support for Linux; added by Joachim Henke */
+ #ifndef _7ZIP_ST
+ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+ #endif
+ int i;
+
+ void * address = NULL;
+ #ifndef _7ZIP_ST
+ pthread_mutex_lock(&mutex);
+ #endif
+ for (i = 0; i < _7ZIP_MAX_HUGE_ALLOCS; ++i)
+ {
+ if (g_HugePageAddr[i] == NULL)
+ {
+ int fd, pathlen = strlen(g_HugetlbPath);
+ char tempname[pathlen+12];
+
+ memcpy(tempname, g_HugetlbPath, pathlen);
+ memcpy(tempname + pathlen, "/7z-XXXXXX", 11);
+ fd = mkstemp(tempname);
+ unlink(tempname);
+ if (fd < 0)
+ {
+ fprintf(stderr,"cant't open %s (%s)\n",tempname,strerror(errno));
+ break;
+ }
+ address = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+ close(fd);
+ if (address == MAP_FAILED)
+ {
+ address = NULL;
+ break;
+ }
+ g_HugePageLen[i] = size;
+ g_HugePageAddr[i] = address;
+// fprintf(stderr,"HUGE[%d]=%ld %p\n",i,(long)size,address);
+ break;
+ }
+ }
+ #ifndef _7ZIP_ST
+ pthread_mutex_unlock(&mutex);
+ #endif
+ return address;
+ #endif
+ }
+ #endif
+ return malloc(size);
+}
+
+static int VirtualFree(void *address)
+{
+ #ifdef _7ZIP_LARGE_PAGES
+ #ifdef __linux__
+ int i;
+
+ for (i = 0; i < _7ZIP_MAX_HUGE_ALLOCS; ++i)
+ {
+ if (g_HugePageAddr[i] == address)
+ {
+ munmap(address, g_HugePageLen[i]);
+ g_HugePageAddr[i] = NULL;
+ return 1;
+ }
+ }
+ #endif
+ #endif
+ free(address);
+ return 1;
+}
+
+#endif
+
+void *MidAlloc(size_t size)
+{
+ if (size == 0)
+ return 0;
+ #ifdef _SZ_ALLOC_DEBUG
+ fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++);
+ #endif
+ return VirtualAlloc(size, 0);
+}
+
+void MidFree(void *address)
+{
+ #ifdef _SZ_ALLOC_DEBUG
+ if (address != 0)
+ fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid);
+ #endif
+ if (address == 0)
+ return;
+ VirtualFree(address);
+}
+
+#ifdef _7ZIP_LARGE_PAGES
+size_t g_LargePageSize = 0;
+#ifdef _WIN32
+typedef SIZE_T (WINAPI *GetLargePageMinimumP)();
+#elif defined(__linux__)
+size_t largePageMinimum()
+{
+ size_t size;
+
+ g_HugetlbPath = getenv("HUGETLB_PATH");
+
+ if (g_HugetlbPath == NULL)
+ {
+ // not defined => try to find out the directory
+ static char dir_hugetlbfs[1024];
+ const char * filename = "/etc/mtab"; // mounted filesystems
+ FILE *fp;
+ struct mntent * info;
+
+ dir_hugetlbfs[0]=0;
+
+ fp = setmntent(filename,"r");
+ if (fp)
+ {
+ info = getmntent(fp);
+ while(info)
+ {
+/*
+ printf("%s:\n",info->mnt_fsname);
+ printf(" dir='%s'\n",info->mnt_dir);
+ printf(" type='%s'\n",info->mnt_type);
+*/
+
+ if (strcmp(info->mnt_type,"hugetlbfs") == 0)
+ {
+ strcpy(dir_hugetlbfs,info->mnt_dir);
+ break;
+ }
+
+ info = getmntent(fp);
+ }
+ endmntent(fp);
+ }
+
+ if (dir_hugetlbfs[0])
+ {
+ g_HugetlbPath = dir_hugetlbfs;
+ // fprintf(stderr," Found hugetlbfs = '%s'\n",g_HugetlbPath);
+ }
+ }
+ if (g_HugetlbPath == NULL || (size = pathconf(g_HugetlbPath, _PC_REC_MIN_XFER_SIZE)) <= getpagesize())
+ return 0;
+ return size;
+}
+#else
+#define largePageMinimum() 0
+#endif
+#endif
+
+void SetLargePageSize()
+{
+ #ifdef _7ZIP_LARGE_PAGES
+ size_t size;
+ #ifdef _WIN32
+ GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP)
+ GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum");
+ if (largePageMinimum == 0)
+ return;
+ #endif
+ size = largePageMinimum();
+ if (size == 0 || (size & (size - 1)) != 0)
+ return;
+ g_LargePageSize = size;
+ // fprintf(stderr,"SetLargePageSize : %ld\n",(long)g_LargePageSize);
+ #endif
+}
+
+
+void *BigAlloc(size_t size)
+{
+ if (size == 0)
+ return 0;
+ #ifdef _SZ_ALLOC_DEBUG
+ fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++);
+ #endif
+
+ #ifdef _7ZIP_LARGE_PAGES
+ if (g_LargePageSize != 0 && g_LargePageSize <= (1 << 30) && size >= (1 << 18))
+ {
+ void *res = VirtualAlloc( (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)), 1);
+ if (res != 0)
+ return res;
+ }
+ #endif
+ return VirtualAlloc(size, 0);
+}
+
+void BigFree(void *address)
+{
+ #ifdef _SZ_ALLOC_DEBUG
+ if (address != 0)
+ fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig);
+ #endif
+
+ if (address == 0)
+ return;
+ VirtualFree(address);
+}
diff --git a/src/libs/7zip/unix/C/Alloc.h b/src/libs/7zip/unix/C/Alloc.h
new file mode 100644
index 000000000..7ef372e3a
--- /dev/null
+++ b/src/libs/7zip/unix/C/Alloc.h
@@ -0,0 +1,27 @@
+/* Alloc.h -- Memory allocation functions
+2009-02-07 : Igor Pavlov : Public domain */
+
+#ifndef __COMMON_ALLOC_H
+#define __COMMON_ALLOC_H
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void *MyAlloc(size_t size);
+void MyFree(void *address);
+
+void SetLargePageSize();
+
+void *MidAlloc(size_t size);
+void MidFree(void *address);
+void *BigAlloc(size_t size);
+void BigFree(void *address);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/libs/7zip/unix/C/Bra.c b/src/libs/7zip/unix/C/Bra.c
new file mode 100644
index 000000000..2e47b1413
--- /dev/null
+++ b/src/libs/7zip/unix/C/Bra.c
@@ -0,0 +1,133 @@
+/* Bra.c -- Converters for RISC code
+2010-04-16 : Igor Pavlov : Public domain */
+
+#include "Bra.h"
+
+SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding)
+{
+ SizeT i;
+ if (size < 4)
+ return 0;
+ size -= 4;
+ ip += 8;
+ for (i = 0; i <= size; i += 4)
+ {
+ if (data[i + 3] == 0xEB)
+ {
+ UInt32 dest;
+ UInt32 src = ((UInt32)data[i + 2] << 16) | ((UInt32)data[i + 1] << 8) | (data[i + 0]);
+ src <<= 2;
+ if (encoding)
+ dest = ip + (UInt32)i + src;
+ else
+ dest = src - (ip + (UInt32)i);
+ dest >>= 2;
+ data[i + 2] = (Byte)(dest >> 16);
+ data[i + 1] = (Byte)(dest >> 8);
+ data[i + 0] = (Byte)dest;
+ }
+ }
+ return i;
+}
+
+SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding)
+{
+ SizeT i;
+ if (size < 4)
+ return 0;
+ size -= 4;
+ ip += 4;
+ for (i = 0; i <= size; i += 2)
+ {
+ if ((data[i + 1] & 0xF8) == 0xF0 &&
+ (data[i + 3] & 0xF8) == 0xF8)
+ {
+ UInt32 dest;
+ UInt32 src =
+ (((UInt32)data[i + 1] & 0x7) << 19) |
+ ((UInt32)data[i + 0] << 11) |
+ (((UInt32)data[i + 3] & 0x7) << 8) |
+ (data[i + 2]);
+
+ src <<= 1;
+ if (encoding)
+ dest = ip + (UInt32)i + src;
+ else
+ dest = src - (ip + (UInt32)i);
+ dest >>= 1;
+
+ data[i + 1] = (Byte)(0xF0 | ((dest >> 19) & 0x7));
+ data[i + 0] = (Byte)(dest >> 11);
+ data[i + 3] = (Byte)(0xF8 | ((dest >> 8) & 0x7));
+ data[i + 2] = (Byte)dest;
+ i += 2;
+ }
+ }
+ return i;
+}
+
+SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding)
+{
+ SizeT i;
+ if (size < 4)
+ return 0;
+ size -= 4;
+ for (i = 0; i <= size; i += 4)
+ {
+ if ((data[i] >> 2) == 0x12 && (data[i + 3] & 3) == 1)
+ {
+ UInt32 src = ((UInt32)(data[i + 0] & 3) << 24) |
+ ((UInt32)data[i + 1] << 16) |
+ ((UInt32)data[i + 2] << 8) |
+ ((UInt32)data[i + 3] & (~3));
+
+ UInt32 dest;
+ if (encoding)
+ dest = ip + (UInt32)i + src;
+ else
+ dest = src - (ip + (UInt32)i);
+ data[i + 0] = (Byte)(0x48 | ((dest >> 24) & 0x3));
+ data[i + 1] = (Byte)(dest >> 16);
+ data[i + 2] = (Byte)(dest >> 8);
+ data[i + 3] &= 0x3;
+ data[i + 3] |= dest;
+ }
+ }
+ return i;
+}
+
+SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding)
+{
+ UInt32 i;
+ if (size < 4)
+ return 0;
+ size -= 4;
+ for (i = 0; i <= size; i += 4)
+ {
+ if ((data[i] == 0x40 && (data[i + 1] & 0xC0) == 0x00) ||
+ (data[i] == 0x7F && (data[i + 1] & 0xC0) == 0xC0))
+ {
+ UInt32 src =
+ ((UInt32)data[i + 0] << 24) |
+ ((UInt32)data[i + 1] << 16) |
+ ((UInt32)data[i + 2] << 8) |
+ ((UInt32)data[i + 3]);
+ UInt32 dest;
+
+ src <<= 2;
+ if (encoding)
+ dest = ip + i + src;
+ else
+ dest = src - (ip + i);
+ dest >>= 2;
+
+ dest = (((0 - ((dest >> 22) & 1)) << 22) & 0x3FFFFFFF) | (dest & 0x3FFFFF) | 0x40000000;
+
+ data[i + 0] = (Byte)(dest >> 24);
+ data[i + 1] = (Byte)(dest >> 16);
+ data[i + 2] = (Byte)(dest >> 8);
+ data[i + 3] = (Byte)dest;
+ }
+ }
+ return i;
+}
diff --git a/src/libs/7zip/unix/C/Bra.h b/src/libs/7zip/unix/C/Bra.h
new file mode 100644
index 000000000..5748c1c05
--- /dev/null
+++ b/src/libs/7zip/unix/C/Bra.h
@@ -0,0 +1,68 @@
+/* Bra.h -- Branch converters for executables
+2009-02-07 : Igor Pavlov : Public domain */
+
+#ifndef __BRA_H
+#define __BRA_H
+
+#include "Types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+These functions convert relative addresses to absolute addresses
+in CALL instructions to increase the compression ratio.
+
+ In:
+ data - data buffer
+ size - size of data
+ ip - current virtual Instruction Pinter (IP) value
+ state - state variable for x86 converter
+ encoding - 0 (for decoding), 1 (for encoding)
+
+ Out:
+ state - state variable for x86 converter
+
+ Returns:
+ The number of processed bytes. If you call these functions with multiple calls,
+ you must start next call with first byte after block of processed bytes.
+
+ Type Endian Alignment LookAhead
+
+ x86 little 1 4
+ ARMT little 2 2
+ ARM little 4 0
+ PPC big 4 0
+ SPARC big 4 0
+ IA64 little 16 0
+
+ size must be >= Alignment + LookAhead, if it's not last block.
+ If (size < Alignment + LookAhead), converter returns 0.
+
+ Example:
+
+ UInt32 ip = 0;
+ for ()
+ {
+ ; size must be >= Alignment + LookAhead, if it's not last block
+ SizeT processed = Convert(data, size, ip, 1);
+ data += processed;
+ size -= processed;
+ ip += processed;
+ }
+*/
+
+#define x86_Convert_Init(state) { state = 0; }
+SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding);
+SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/libs/7zip/unix/C/Bra86.c b/src/libs/7zip/unix/C/Bra86.c
new file mode 100644
index 000000000..1ee0e709b
--- /dev/null
+++ b/src/libs/7zip/unix/C/Bra86.c
@@ -0,0 +1,85 @@
+/* Bra86.c -- Converter for x86 code (BCJ)
+2008-10-04 : Igor Pavlov : Public domain */
+
+#include "Bra.h"
+
+#define Test86MSByte(b) ((b) == 0 || (b) == 0xFF)
+
+const Byte kMaskToAllowedStatus[8] = {1, 1, 1, 0, 1, 0, 0, 0};
+const Byte kMaskToBitNumber[8] = {0, 1, 2, 2, 3, 3, 3, 3};
+
+SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding)
+{
+ SizeT bufferPos = 0, prevPosT;
+ UInt32 prevMask = *state & 0x7;
+ if (size < 5)
+ return 0;
+ ip += 5;
+ prevPosT = (SizeT)0 - 1;
+
+ for (;;)
+ {
+ Byte *p = data + bufferPos;
+ Byte *limit = data + size - 4;
+ for (; p < limit; p++)
+ if ((*p & 0xFE) == 0xE8)
+ break;
+ bufferPos = (SizeT)(p - data);
+ if (p >= limit)
+ break;
+ prevPosT = bufferPos - prevPosT;
+ if (prevPosT > 3)
+ prevMask = 0;
+ else
+ {
+ prevMask = (prevMask << ((int)prevPosT - 1)) & 0x7;
+ if (prevMask != 0)
+ {
+ Byte b = p[4 - kMaskToBitNumber[prevMask]];
+ if (!kMaskToAllowedStatus[prevMask] || Test86MSByte(b))
+ {
+ prevPosT = bufferPos;
+ prevMask = ((prevMask << 1) & 0x7) | 1;
+ bufferPos++;
+ continue;
+ }
+ }
+ }
+ prevPosT = bufferPos;
+
+ if (Test86MSByte(p[4]))
+ {
+ UInt32 src = ((UInt32)p[4] << 24) | ((UInt32)p[3] << 16) | ((UInt32)p[2] << 8) | ((UInt32)p[1]);
+ UInt32 dest;
+ for (;;)
+ {
+ Byte b;
+ int index;
+ if (encoding)
+ dest = (ip + (UInt32)bufferPos) + src;
+ else
+ dest = src - (ip + (UInt32)bufferPos);
+ if (prevMask == 0)
+ break;
+ index = kMaskToBitNumber[prevMask] * 8;
+ b = (Byte)(dest >> (24 - index));
+ if (!Test86MSByte(b))
+ break;
+ src = dest ^ ((1 << (32 - index)) - 1);
+ }
+ p[4] = (Byte)(~(((dest >> 24) & 1) - 1));
+ p[3] = (Byte)(dest >> 16);
+ p[2] = (Byte)(dest >> 8);
+ p[1] = (Byte)dest;
+ bufferPos += 5;
+ }
+ else
+ {
+ prevMask = ((prevMask << 1) & 0x7) | 1;
+ bufferPos++;
+ }
+ }
+ prevPosT = bufferPos - prevPosT;
+ *state = ((prevPosT > 3) ? 0 : ((prevMask << ((int)prevPosT - 1)) & 0x7));
+ return bufferPos;
+}
diff --git a/src/libs/7zip/unix/C/BraIA64.c b/src/libs/7zip/unix/C/BraIA64.c
new file mode 100644
index 000000000..0b4ee85bc
--- /dev/null
+++ b/src/libs/7zip/unix/C/BraIA64.c
@@ -0,0 +1,67 @@
+/* BraIA64.c -- Converter for IA-64 code
+2008-10-04 : Igor Pavlov : Public domain */
+
+#include "Bra.h"
+
+static const Byte kBranchTable[32] =
+{
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 4, 6, 6, 0, 0, 7, 7,
+ 4, 4, 0, 0, 4, 4, 0, 0
+};
+
+SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding)
+{
+ SizeT i;
+ if (size < 16)
+ return 0;
+ size -= 16;
+ for (i = 0; i <= size; i += 16)
+ {
+ UInt32 instrTemplate = data[i] & 0x1F;
+ UInt32 mask = kBranchTable[instrTemplate];
+ UInt32 bitPos = 5;
+ int slot;
+ for (slot = 0; slot < 3; slot++, bitPos += 41)
+ {
+ UInt32 bytePos, bitRes;
+ UInt64 instruction, instNorm;
+ int j;
+ if (((mask >> slot) & 1) == 0)
+ continue;
+ bytePos = (bitPos >> 3);
+ bitRes = bitPos & 0x7;
+ instruction = 0;
+ for (j = 0; j < 6; j++)
+ instruction += (UInt64)data[i + j + bytePos] << (8 * j);
+
+ instNorm = instruction >> bitRes;
+ if (((instNorm >> 37) & 0xF) == 0x5 && ((instNorm >> 9) & 0x7) == 0)
+ {
+ UInt32 src = (UInt32)((instNorm >> 13) & 0xFFFFF);
+ UInt32 dest;
+ src |= ((UInt32)(instNorm >> 36) & 1) << 20;
+
+ src <<= 4;
+
+ if (encoding)
+ dest = ip + (UInt32)i + src;
+ else
+ dest = src - (ip + (UInt32)i);
+
+ dest >>= 4;
+
+ instNorm &= ~((UInt64)(0x8FFFFF) << 13);
+ instNorm |= ((UInt64)(dest & 0xFFFFF) << 13);
+ instNorm |= ((UInt64)(dest & 0x100000) << (36 - 20));
+
+ instruction &= (1 << bitRes) - 1;
+ instruction |= (instNorm << bitRes);
+ for (j = 0; j < 6; j++)
+ data[i + j + bytePos] = (Byte)(instruction >> (8 * j));
+ }
+ }
+ }
+ return i;
+}
diff --git a/src/libs/7zip/unix/C/BwtSort.c b/src/libs/7zip/unix/C/BwtSort.c
new file mode 100644
index 000000000..207305072
--- /dev/null
+++ b/src/libs/7zip/unix/C/BwtSort.c
@@ -0,0 +1,516 @@
+/* BwtSort.c -- BWT block sorting
+2008-08-17
+Igor Pavlov
+Public domain */
+
+#include "BwtSort.h"
+#include "Sort.h"
+
+/* #define BLOCK_SORT_USE_HEAP_SORT */
+
+#define NO_INLINE MY_FAST_CALL
+
+/* Don't change it !!! */
+#define kNumHashBytes 2
+#define kNumHashValues (1 << (kNumHashBytes * 8))
+
+/* kNumRefBitsMax must be < (kNumHashBytes * 8) = 16 */
+#define kNumRefBitsMax 12
+
+#define BS_TEMP_SIZE kNumHashValues
+
+#ifdef BLOCK_SORT_EXTERNAL_FLAGS
+
+/* 32 Flags in UInt32 word */
+#define kNumFlagsBits 5
+#define kNumFlagsInWord (1 << kNumFlagsBits)
+#define kFlagsMask (kNumFlagsInWord - 1)
+#define kAllFlags 0xFFFFFFFF
+
+#else
+
+#define kNumBitsMax 20
+#define kIndexMask ((1 << kNumBitsMax) - 1)
+#define kNumExtraBits (32 - kNumBitsMax)
+#define kNumExtra0Bits (kNumExtraBits - 2)
+#define kNumExtra0Mask ((1 << kNumExtra0Bits) - 1)
+
+#define SetFinishedGroupSize(p, size) \
+ { *(p) |= ((((size) - 1) & kNumExtra0Mask) << kNumBitsMax); \
+ if ((size) > (1 << kNumExtra0Bits)) { \
+ *(p) |= 0x40000000; *((p) + 1) |= ((((size) - 1)>> kNumExtra0Bits) << kNumBitsMax); } } \
+
+static void SetGroupSize(UInt32 *p, UInt32 size)
+{
+ if (--size == 0)
+ return;
+ *p |= 0x80000000 | ((size & kNumExtra0Mask) << kNumBitsMax);
+ if (size >= (1 << kNumExtra0Bits))
+ {
+ *p |= 0x40000000;
+ p[1] |= ((size >> kNumExtra0Bits) << kNumBitsMax);
+ }
+}
+
+#endif
+
+/*
+SortGroup - is recursive Range-Sort function with HeapSort optimization for small blocks
+ "range" is not real range. It's only for optimization.
+returns: 1 - if there are groups, 0 - no more groups
+*/
+
+UInt32 NO_INLINE SortGroup(UInt32 BlockSize, UInt32 NumSortedBytes, UInt32 groupOffset, UInt32 groupSize, int NumRefBits, UInt32 *Indices
+ #ifndef BLOCK_SORT_USE_HEAP_SORT
+ , UInt32 left, UInt32 range
+ #endif
+ )
+{
+ UInt32 *ind2 = Indices + groupOffset;
+ UInt32 *Groups;
+ if (groupSize <= 1)
+ {
+ /*
+ #ifndef BLOCK_SORT_EXTERNAL_FLAGS
+ SetFinishedGroupSize(ind2, 1);
+ #endif
+ */
+ return 0;
+ }
+ Groups = Indices + BlockSize + BS_TEMP_SIZE;
+ if (groupSize <= ((UInt32)1 << NumRefBits)
+ #ifndef BLOCK_SORT_USE_HEAP_SORT
+ && groupSize <= range
+ #endif
+ )
+ {
+ UInt32 *temp = Indices + BlockSize;
+ UInt32 j;
+ UInt32 mask, thereAreGroups, group, cg;
+ {
+ UInt32 gPrev;
+ UInt32 gRes = 0;
+ {
+ UInt32 sp = ind2[0] + NumSortedBytes;
+ if (sp >= BlockSize) sp -= BlockSize;
+ gPrev = Groups[sp];
+ temp[0] = (gPrev << NumRefBits);
+ }
+
+ for (j = 1; j < groupSize; j++)
+ {
+ UInt32 sp = ind2[j] + NumSortedBytes;
+ UInt32 g;
+ if (sp >= BlockSize) sp -= BlockSize;
+ g = Groups[sp];
+ temp[j] = (g << NumRefBits) | j;
+ gRes |= (gPrev ^ g);
+ }
+ if (gRes == 0)
+ {
+ #ifndef BLOCK_SORT_EXTERNAL_FLAGS
+ SetGroupSize(ind2, groupSize);
+ #endif
+ return 1;
+ }
+ }
+
+ HeapSort(temp, groupSize);
+ mask = ((1 << NumRefBits) - 1);
+ thereAreGroups = 0;
+
+ group = groupOffset;
+ cg = (temp[0] >> NumRefBits);
+ temp[0] = ind2[temp[0] & mask];
+
+ {
+ #ifdef BLOCK_SORT_EXTERNAL_FLAGS
+ UInt32 *Flags = Groups + BlockSize;
+ #else
+ UInt32 prevGroupStart = 0;
+ #endif
+
+ for (j = 1; j < groupSize; j++)
+ {
+ UInt32 val = temp[j];
+ UInt32 cgCur = (val >> NumRefBits);
+
+ if (cgCur != cg)
+ {
+ cg = cgCur;
+ group = groupOffset + j;
+
+ #ifdef BLOCK_SORT_EXTERNAL_FLAGS
+ {
+ UInt32 t = group - 1;
+ Flags[t >> kNumFlagsBits] &= ~(1 << (t & kFlagsMask));
+ }
+ #else
+ SetGroupSize(temp + prevGroupStart, j - prevGroupStart);
+ prevGroupStart = j;
+ #endif
+ }
+ else
+ thereAreGroups = 1;
+ {
+ UInt32 ind = ind2[val & mask];
+ temp[j] = ind;
+ Groups[ind] = group;
+ }
+ }
+
+ #ifndef BLOCK_SORT_EXTERNAL_FLAGS
+ SetGroupSize(temp + prevGroupStart, j - prevGroupStart);
+ #endif
+ }
+
+ for (j = 0; j < groupSize; j++)
+ ind2[j] = temp[j];
+ return thereAreGroups;
+ }
+
+ /* Check that all strings are in one group (cannot sort) */
+ {
+ UInt32 group, j;
+ UInt32 sp = ind2[0] + NumSortedBytes; if (sp >= BlockSize) sp -= BlockSize;
+ group = Groups[sp];
+ for (j = 1; j < groupSize; j++)
+ {
+ sp = ind2[j] + NumSortedBytes; if (sp >= BlockSize) sp -= BlockSize;
+ if (Groups[sp] != group)
+ break;
+ }
+ if (j == groupSize)
+ {
+ #ifndef BLOCK_SORT_EXTERNAL_FLAGS
+ SetGroupSize(ind2, groupSize);
+ #endif
+ return 1;
+ }
+ }
+
+ #ifndef BLOCK_SORT_USE_HEAP_SORT
+ {
+ /* ---------- Range Sort ---------- */
+ UInt32 i;
+ UInt32 mid;
+ for (;;)
+ {
+ UInt32 j;
+ if (range <= 1)
+ {
+ #ifndef BLOCK_SORT_EXTERNAL_FLAGS
+ SetGroupSize(ind2, groupSize);
+ #endif
+ return 1;
+ }
+ mid = left + ((range + 1) >> 1);
+ j = groupSize;
+ i = 0;
+ do
+ {
+ UInt32 sp = ind2[i] + NumSortedBytes; if (sp >= BlockSize) sp -= BlockSize;
+ if (Groups[sp] >= mid)
+ {
+ for (j--; j > i; j--)
+ {
+ sp = ind2[j] + NumSortedBytes; if (sp >= BlockSize) sp -= BlockSize;
+ if (Groups[sp] < mid)
+ {
+ UInt32 temp = ind2[i]; ind2[i] = ind2[j]; ind2[j] = temp;
+ break;
+ }
+ }
+ if (i >= j)
+ break;
+ }
+ }
+ while (++i < j);
+ if (i == 0)
+ {
+ range = range - (mid - left);
+ left = mid;
+ }
+ else if (i == groupSize)
+ range = (mid - left);
+ else
+ break;
+ }
+
+ #ifdef BLOCK_SORT_EXTERNAL_FLAGS
+ {
+ UInt32 t = (groupOffset + i - 1);
+ UInt32 *Flags = Groups + BlockSize;
+ Flags[t >> kNumFlagsBits] &= ~(1 << (t & kFlagsMask));
+ }
+ #endif
+
+ {
+ UInt32 j;
+ for (j = i; j < groupSize; j++)
+ Groups[ind2[j]] = groupOffset + i;
+ }
+
+ {
+ UInt32 res = SortGroup(BlockSize, NumSortedBytes, groupOffset, i, NumRefBits, Indices, left, mid - left);
+ return res | SortGroup(BlockSize, NumSortedBytes, groupOffset + i, groupSize - i, NumRefBits, Indices, mid, range - (mid - left));
+ }
+
+ }
+
+ #else
+
+ /* ---------- Heap Sort ---------- */
+
+ {
+ UInt32 j;
+ for (j = 0; j < groupSize; j++)
+ {
+ UInt32 sp = ind2[j] + NumSortedBytes; if (sp >= BlockSize) sp -= BlockSize;
+ ind2[j] = sp;
+ }
+
+ HeapSortRef(ind2, Groups, groupSize);
+
+ /* Write Flags */
+ {
+ UInt32 sp = ind2[0];
+ UInt32 group = Groups[sp];
+
+ #ifdef BLOCK_SORT_EXTERNAL_FLAGS
+ UInt32 *Flags = Groups + BlockSize;
+ #else
+ UInt32 prevGroupStart = 0;
+ #endif
+
+ for (j = 1; j < groupSize; j++)
+ {
+ sp = ind2[j];
+ if (Groups[sp] != group)
+ {
+ group = Groups[sp];
+ #ifdef BLOCK_SORT_EXTERNAL_FLAGS
+ {
+ UInt32 t = groupOffset + j - 1;
+ Flags[t >> kNumFlagsBits] &= ~(1 << (t & kFlagsMask));
+ }
+ #else
+ SetGroupSize(ind2 + prevGroupStart, j - prevGroupStart);
+ prevGroupStart = j;
+ #endif
+ }
+ }
+
+ #ifndef BLOCK_SORT_EXTERNAL_FLAGS
+ SetGroupSize(ind2 + prevGroupStart, j - prevGroupStart);
+ #endif
+ }
+ {
+ /* Write new Groups values and Check that there are groups */
+ UInt32 thereAreGroups = 0;
+ for (j = 0; j < groupSize; j++)
+ {
+ UInt32 group = groupOffset + j;
+ #ifndef BLOCK_SORT_EXTERNAL_FLAGS
+ UInt32 subGroupSize = ((ind2[j] & ~0xC0000000) >> kNumBitsMax);
+ if ((ind2[j] & 0x40000000) != 0)
+ subGroupSize += ((ind2[j + 1] >> kNumBitsMax) << kNumExtra0Bits);
+ subGroupSize++;
+ for (;;)
+ {
+ UInt32 original = ind2[j];
+ UInt32 sp = original & kIndexMask;
+ if (sp < NumSortedBytes) sp += BlockSize; sp -= NumSortedBytes;
+ ind2[j] = sp | (original & ~kIndexMask);
+ Groups[sp] = group;
+ if (--subGroupSize == 0)
+ break;
+ j++;
+ thereAreGroups = 1;
+ }
+ #else
+ UInt32 *Flags = Groups + BlockSize;
+ for (;;)
+ {
+ UInt32 sp = ind2[j]; if (sp < NumSortedBytes) sp += BlockSize; sp -= NumSortedBytes;
+ ind2[j] = sp;
+ Groups[sp] = group;
+ if ((Flags[(groupOffset + j) >> kNumFlagsBits] & (1 << ((groupOffset + j) & kFlagsMask))) == 0)
+ break;
+ j++;
+ thereAreGroups = 1;
+ }
+ #endif
+ }
+ return thereAreGroups;
+ }
+ }
+ #endif
+}
+
+/* conditions: blockSize > 0 */
+UInt32 BlockSort(UInt32 *Indices, const Byte *data, UInt32 blockSize)
+{
+ UInt32 *counters = Indices + blockSize;
+ UInt32 i;
+ UInt32 *Groups;
+ #ifdef BLOCK_SORT_EXTERNAL_FLAGS
+ UInt32 *Flags;
+ #endif
+
+ /* Radix-Sort for 2 bytes */
+ for (i = 0; i < kNumHashValues; i++)
+ counters[i] = 0;
+ for (i = 0; i < blockSize - 1; i++)
+ counters[((UInt32)data[i] << 8) | data[i + 1]]++;
+ counters[((UInt32)data[i] << 8) | data[0]]++;
+
+ Groups = counters + BS_TEMP_SIZE;
+ #ifdef BLOCK_SORT_EXTERNAL_FLAGS
+ Flags = Groups + blockSize;
+ {
+ UInt32 numWords = (blockSize + kFlagsMask) >> kNumFlagsBits;
+ for (i = 0; i < numWords; i++)
+ Flags[i] = kAllFlags;
+ }
+ #endif
+
+ {
+ UInt32 sum = 0;
+ for (i = 0; i < kNumHashValues; i++)
+ {
+ UInt32 groupSize = counters[i];
+ if (groupSize > 0)
+ {
+ #ifdef BLOCK_SORT_EXTERNAL_FLAGS
+ UInt32 t = sum + groupSize - 1;
+ Flags[t >> kNumFlagsBits] &= ~(1 << (t & kFlagsMask));
+ #endif
+ sum += groupSize;
+ }
+ counters[i] = sum - groupSize;
+ }
+
+ for (i = 0; i < blockSize - 1; i++)
+ Groups[i] = counters[((UInt32)data[i] << 8) | data[i + 1]];
+ Groups[i] = counters[((UInt32)data[i] << 8) | data[0]];
+
+ for (i = 0; i < blockSize - 1; i++)
+ Indices[counters[((UInt32)data[i] << 8) | data[i + 1]]++] = i;
+ Indices[counters[((UInt32)data[i] << 8) | data[0]]++] = i;
+
+ #ifndef BLOCK_SORT_EXTERNAL_FLAGS
+ {
+ UInt32 prev = 0;
+ for (i = 0; i < kNumHashValues; i++)
+ {
+ UInt32 prevGroupSize = counters[i] - prev;
+ if (prevGroupSize == 0)
+ continue;
+ SetGroupSize(Indices + prev, prevGroupSize);
+ prev = counters[i];
+ }
+ }
+ #endif
+ }
+
+ {
+ int NumRefBits;
+ UInt32 NumSortedBytes;
+ for (NumRefBits = 0; ((blockSize - 1) >> NumRefBits) != 0; NumRefBits++);
+ NumRefBits = 32 - NumRefBits;
+ if (NumRefBits > kNumRefBitsMax)
+ NumRefBits = kNumRefBitsMax;
+
+ for (NumSortedBytes = kNumHashBytes; ; NumSortedBytes <<= 1)
+ {
+ #ifndef BLOCK_SORT_EXTERNAL_FLAGS
+ UInt32 finishedGroupSize = 0;
+ #endif
+ UInt32 newLimit = 0;
+ for (i = 0; i < blockSize;)
+ {
+ UInt32 groupSize;
+ #ifdef BLOCK_SORT_EXTERNAL_FLAGS
+
+ if ((Flags[i >> kNumFlagsBits] & (1 << (i & kFlagsMask))) == 0)
+ {
+ i++;
+ continue;
+ }
+ for (groupSize = 1;
+ (Flags[(i + groupSize) >> kNumFlagsBits] & (1 << ((i + groupSize) & kFlagsMask))) != 0;
+ groupSize++);
+
+ groupSize++;
+
+ #else
+
+ groupSize = ((Indices[i] & ~0xC0000000) >> kNumBitsMax);
+ {
+ Bool finishedGroup = ((Indices[i] & 0x80000000) == 0);
+ if ((Indices[i] & 0x40000000) != 0)
+ {
+ groupSize += ((Indices[i + 1] >> kNumBitsMax) << kNumExtra0Bits);
+ Indices[i + 1] &= kIndexMask;
+ }
+ Indices[i] &= kIndexMask;
+ groupSize++;
+ if (finishedGroup || groupSize == 1)
+ {
+ Indices[i - finishedGroupSize] &= kIndexMask;
+ if (finishedGroupSize > 1)
+ Indices[i - finishedGroupSize + 1] &= kIndexMask;
+ {
+ UInt32 newGroupSize = groupSize + finishedGroupSize;
+ SetFinishedGroupSize(Indices + i - finishedGroupSize, newGroupSize);
+ finishedGroupSize = newGroupSize;
+ }
+ i += groupSize;
+ continue;
+ }
+ finishedGroupSize = 0;
+ }
+
+ #endif
+
+ if (NumSortedBytes >= blockSize)
+ {
+ UInt32 j;
+ for (j = 0; j < groupSize; j++)
+ {
+ UInt32 t = (i + j);
+ /* Flags[t >> kNumFlagsBits] &= ~(1 << (t & kFlagsMask)); */
+ Groups[Indices[t]] = t;
+ }
+ }
+ else
+ if (SortGroup(blockSize, NumSortedBytes, i, groupSize, NumRefBits, Indices
+ #ifndef BLOCK_SORT_USE_HEAP_SORT
+ , 0, blockSize
+ #endif
+ ) != 0)
+ newLimit = i + groupSize;
+ i += groupSize;
+ }
+ if (newLimit == 0)
+ break;
+ }
+ }
+ #ifndef BLOCK_SORT_EXTERNAL_FLAGS
+ for (i = 0; i < blockSize;)
+ {
+ UInt32 groupSize = ((Indices[i] & ~0xC0000000) >> kNumBitsMax);
+ if ((Indices[i] & 0x40000000) != 0)
+ {
+ groupSize += ((Indices[i + 1] >> kNumBitsMax) << kNumExtra0Bits);
+ Indices[i + 1] &= kIndexMask;
+ }
+ Indices[i] &= kIndexMask;
+ groupSize++;
+ i += groupSize;
+ }
+ #endif
+ return Groups[0];
+}
+
diff --git a/src/libs/7zip/unix/C/BwtSort.h b/src/libs/7zip/unix/C/BwtSort.h
new file mode 100644
index 000000000..ce5598f0f
--- /dev/null
+++ b/src/libs/7zip/unix/C/BwtSort.h
@@ -0,0 +1,30 @@
+/* BwtSort.h -- BWT block sorting
+2009-02-07 : Igor Pavlov : Public domain */
+
+#ifndef __BWT_SORT_H
+#define __BWT_SORT_H
+
+#include "Types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* use BLOCK_SORT_EXTERNAL_FLAGS if blockSize can be > 1M */
+/* #define BLOCK_SORT_EXTERNAL_FLAGS */
+
+#ifdef BLOCK_SORT_EXTERNAL_FLAGS
+#define BLOCK_SORT_EXTERNAL_SIZE(blockSize) ((((blockSize) + 31) >> 5))
+#else
+#define BLOCK_SORT_EXTERNAL_SIZE(blockSize) 0
+#endif
+
+#define BLOCK_SORT_BUF_SIZE(blockSize) ((blockSize) * 2 + BLOCK_SORT_EXTERNAL_SIZE(blockSize) + (1 << 16))
+
+UInt32 BlockSort(UInt32 *indices, const Byte *data, UInt32 blockSize);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/libs/7zip/unix/C/CpuArch.c b/src/libs/7zip/unix/C/CpuArch.c
new file mode 100644
index 000000000..260cc1f45
--- /dev/null
+++ b/src/libs/7zip/unix/C/CpuArch.c
@@ -0,0 +1,168 @@
+/* CpuArch.c -- CPU specific code
+2010-10-26: Igor Pavlov : Public domain */
+
+#include "CpuArch.h"
+
+#ifdef MY_CPU_X86_OR_AMD64
+
+#if (defined(_MSC_VER) && !defined(MY_CPU_AMD64)) || defined(__GNUC__)
+#define USE_ASM
+#endif
+
+#if defined(USE_ASM) && !defined(MY_CPU_AMD64)
+static UInt32 CheckFlag(UInt32 flag)
+{
+ #ifdef _MSC_VER
+ __asm pushfd;
+ __asm pop EAX;
+ __asm mov EDX, EAX;
+ __asm xor EAX, flag;
+ __asm push EAX;
+ __asm popfd;
+ __asm pushfd;
+ __asm pop EAX;
+ __asm xor EAX, EDX;
+ __asm push EDX;
+ __asm popfd;
+ __asm and flag, EAX;
+ #else
+ __asm__ __volatile__ (
+ "pushf\n\t"
+ "pop %%EAX\n\t"
+ "movl %%EAX,%%EDX\n\t"
+ "xorl %0,%%EAX\n\t"
+ "push %%EAX\n\t"
+ "popf\n\t"
+ "pushf\n\t"
+ "pop %%EAX\n\t"
+ "xorl %%EDX,%%EAX\n\t"
+ "push %%EDX\n\t"
+ "popf\n\t"
+ "andl %%EAX, %0\n\t":
+ "=c" (flag) : "c" (flag));
+ #endif
+ return flag;
+}
+#define CHECK_CPUID_IS_SUPPORTED if (CheckFlag(1 << 18) == 0 || CheckFlag(1 << 21) == 0) return False;
+#else
+#define CHECK_CPUID_IS_SUPPORTED
+#endif
+
+static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d)
+{
+ #ifdef USE_ASM
+
+ #ifdef _MSC_VER
+
+ UInt32 a2, b2, c2, d2;
+ __asm xor EBX, EBX;
+ __asm xor ECX, ECX;
+ __asm xor EDX, EDX;
+ __asm mov EAX, function;
+ __asm cpuid;
+ __asm mov a2, EAX;
+ __asm mov b2, EBX;
+ __asm mov c2, ECX;
+ __asm mov d2, EDX;
+
+ *a = a2;
+ *b = b2;
+ *c = c2;
+ *d = d2;
+
+ #else
+
+ __asm__ __volatile__ (
+ "cpuid"
+ : "=a" (*a) ,
+ "=b" (*b) ,
+ "=c" (*c) ,
+ "=d" (*d)
+ : "0" (function)) ;
+
+ #endif
+
+ #else
+
+ int CPUInfo[4];
+ __cpuid(CPUInfo, function);
+ *a = CPUInfo[0];
+ *b = CPUInfo[1];
+ *c = CPUInfo[2];
+ *d = CPUInfo[3];
+
+ #endif
+}
+
+Bool x86cpuid_CheckAndRead(Cx86cpuid *p)
+{
+ CHECK_CPUID_IS_SUPPORTED
+ MyCPUID(0, &p->maxFunc, &p->vendor[0], &p->vendor[2], &p->vendor[1]);
+ MyCPUID(1, &p->ver, &p->b, &p->c, &p->d);
+ return True;
+}
+
+static UInt32 kVendors[][3] =
+{
+ { 0x756E6547, 0x49656E69, 0x6C65746E},
+ { 0x68747541, 0x69746E65, 0x444D4163},
+ { 0x746E6543, 0x48727561, 0x736C7561}
+};
+
+int x86cpuid_GetFirm(const Cx86cpuid *p)
+{
+ unsigned i;
+ for (i = 0; i < sizeof(kVendors) / sizeof(kVendors[i]); i++)
+ {
+ const UInt32 *v = kVendors[i];
+ if (v[0] == p->vendor[0] &&
+ v[1] == p->vendor[1] &&
+ v[2] == p->vendor[2])
+ return (int)i;
+ }
+ return -1;
+}
+
+Bool CPU_Is_InOrder()
+{
+ Cx86cpuid p;
+ int firm;
+ UInt32 family, model;
+ if (!x86cpuid_CheckAndRead(&p))
+ return True;
+ family = x86cpuid_GetFamily(&p);
+ model = x86cpuid_GetModel(&p);
+ firm = x86cpuid_GetFirm(&p);
+ switch (firm)
+ {
+ case CPU_FIRM_INTEL: return (family < 6 || (family == 6 && model == 0x100C));
+ case CPU_FIRM_AMD: return (family < 5 || (family == 5 && (model < 6 || model == 0xA)));
+ case CPU_FIRM_VIA: return (family < 6 || (family == 6 && model < 0xF));
+ }
+ return True;
+}
+
+#if !defined(MY_CPU_AMD64) && defined(_WIN32)
+static Bool CPU_Sys_Is_SSE_Supported()
+{
+ OSVERSIONINFO vi;
+ vi.dwOSVersionInfoSize = sizeof(vi);
+ if (!GetVersionEx(&vi))
+ return False;
+ return (vi.dwMajorVersion >= 5);
+}
+#define CHECK_SYS_SSE_SUPPORT if (!CPU_Sys_Is_SSE_Supported()) return False;
+#else
+#define CHECK_SYS_SSE_SUPPORT
+#endif
+
+Bool CPU_Is_Aes_Supported()
+{
+ Cx86cpuid p;
+ CHECK_SYS_SSE_SUPPORT
+ if (!x86cpuid_CheckAndRead(&p))
+ return False;
+ return (p.c >> 25) & 1;
+}
+
+#endif
diff --git a/src/libs/7zip/unix/C/CpuArch.h b/src/libs/7zip/unix/C/CpuArch.h
new file mode 100644
index 000000000..01930c7e6
--- /dev/null
+++ b/src/libs/7zip/unix/C/CpuArch.h
@@ -0,0 +1,155 @@
+/* CpuArch.h -- CPU specific code
+2010-10-26: Igor Pavlov : Public domain */
+
+#ifndef __CPU_ARCH_H
+#define __CPU_ARCH_H
+
+#include "Types.h"
+
+EXTERN_C_BEGIN
+
+/*
+MY_CPU_LE means that CPU is LITTLE ENDIAN.
+If MY_CPU_LE is not defined, we don't know about that property of platform (it can be LITTLE ENDIAN).
+
+MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned memory accesses.
+If MY_CPU_LE_UNALIGN is not defined, we don't know about these properties of platform.
+*/
+
+#if defined(_M_X64) || defined(_M_AMD64) || defined(__x86_64__)
+#define MY_CPU_AMD64
+#endif
+
+#if defined(MY_CPU_AMD64) || defined(_M_IA64)
+#define MY_CPU_64BIT
+#endif
+
+#if defined(_M_IX86) || defined(__i386__)
+#define MY_CPU_X86
+#endif
+
+#if defined(MY_CPU_X86) || defined(MY_CPU_AMD64)
+#define MY_CPU_X86_OR_AMD64
+#endif
+
+#if defined(MY_CPU_X86) || defined(_M_ARM)
+#define MY_CPU_32BIT
+#endif
+
+#if defined(_WIN32) && defined(_M_ARM)
+#define MY_CPU_ARM_LE
+#endif
+
+#if defined(_WIN32) && defined(_M_IA64)
+#define MY_CPU_IA64_LE
+#endif
+
+#if defined(MY_CPU_X86_OR_AMD64)
+#define MY_CPU_LE_UNALIGN
+#endif
+
+#if defined(MY_CPU_X86_OR_AMD64) || defined(MY_CPU_ARM_LE) || defined(MY_CPU_IA64_LE) || defined(__ARMEL__) || defined(__MIPSEL__) || defined(__LITTLE_ENDIAN__)
+#define MY_CPU_LE
+#endif
+
+#if defined(__BIG_ENDIAN__)
+#define MY_CPU_BE
+#endif
+
+#if defined(MY_CPU_LE) && defined(MY_CPU_BE)
+Stop_Compiling_Bad_Endian
+#endif
+
+#ifdef MY_CPU_LE_UNALIGN
+
+#define GetUi16(p) (*(const UInt16 *)(p))
+#define GetUi32(p) (*(const UInt32 *)(p))
+#define GetUi64(p) (*(const UInt64 *)(p))
+#define SetUi16(p, d) *(UInt16 *)(p) = (d);
+#define SetUi32(p, d) *(UInt32 *)(p) = (d);
+#define SetUi64(p, d) *(UInt64 *)(p) = (d);
+
+#else
+
+#define GetUi16(p) (((const Byte *)(p))[0] | ((UInt16)((const Byte *)(p))[1] << 8))
+
+#define GetUi32(p) ( \
+ ((const Byte *)(p))[0] | \
+ ((UInt32)((const Byte *)(p))[1] << 8) | \
+ ((UInt32)((const Byte *)(p))[2] << 16) | \
+ ((UInt32)((const Byte *)(p))[3] << 24))
+
+#define GetUi64(p) (GetUi32(p) | ((UInt64)GetUi32(((const Byte *)(p)) + 4) << 32))
+
+#define SetUi16(p, d) { UInt32 _x_ = (d); \
+ ((Byte *)(p))[0] = (Byte)_x_; \
+ ((Byte *)(p))[1] = (Byte)(_x_ >> 8); }
+
+#define SetUi32(p, d) { UInt32 _x_ = (d); \
+ ((Byte *)(p))[0] = (Byte)_x_; \
+ ((Byte *)(p))[1] = (Byte)(_x_ >> 8); \
+ ((Byte *)(p))[2] = (Byte)(_x_ >> 16); \
+ ((Byte *)(p))[3] = (Byte)(_x_ >> 24); }
+
+#define SetUi64(p, d) { UInt64 _x64_ = (d); \
+ SetUi32(p, (UInt32)_x64_); \
+ SetUi32(((Byte *)(p)) + 4, (UInt32)(_x64_ >> 32)); }
+
+#endif
+
+#if defined(MY_CPU_LE_UNALIGN) && defined(_WIN64) && (_MSC_VER >= 1300)
+
+#pragma intrinsic(_byteswap_ulong)
+#pragma intrinsic(_byteswap_uint64)
+#define GetBe32(p) _byteswap_ulong(*(const UInt32 *)(const Byte *)(p))
+#define GetBe64(p) _byteswap_uint64(*(const UInt64 *)(const Byte *)(p))
+
+#else
+
+#define GetBe32(p) ( \
+ ((UInt32)((const Byte *)(p))[0] << 24) | \
+ ((UInt32)((const Byte *)(p))[1] << 16) | \
+ ((UInt32)((const Byte *)(p))[2] << 8) | \
+ ((const Byte *)(p))[3] )
+
+#define GetBe64(p) (((UInt64)GetBe32(p) << 32) | GetBe32(((const Byte *)(p)) + 4))
+
+#endif
+
+#define GetBe16(p) (((UInt16)((const Byte *)(p))[0] << 8) | ((const Byte *)(p))[1])
+
+
+#ifdef MY_CPU_X86_OR_AMD64
+
+typedef struct
+{
+ UInt32 maxFunc;
+ UInt32 vendor[3];
+ UInt32 ver;
+ UInt32 b;
+ UInt32 c;
+ UInt32 d;
+} Cx86cpuid;
+
+enum
+{
+ CPU_FIRM_INTEL,
+ CPU_FIRM_AMD,
+ CPU_FIRM_VIA
+};
+
+Bool x86cpuid_CheckAndRead(Cx86cpuid *p);
+int x86cpuid_GetFirm(const Cx86cpuid *p);
+
+#define x86cpuid_GetFamily(p) (((p)->ver >> 8) & 0xFF00F)
+#define x86cpuid_GetModel(p) (((p)->ver >> 4) & 0xF00F)
+#define x86cpuid_GetStepping(p) ((p)->ver & 0xF)
+
+Bool CPU_Is_InOrder();
+Bool CPU_Is_Aes_Supported();
+
+#endif
+
+EXTERN_C_END
+
+#endif
diff --git a/src/libs/7zip/unix/C/Delta.c b/src/libs/7zip/unix/C/Delta.c
new file mode 100644
index 000000000..2b327f15f
--- /dev/null
+++ b/src/libs/7zip/unix/C/Delta.c
@@ -0,0 +1,62 @@
+/* Delta.c -- Delta converter
+2009-05-26 : Igor Pavlov : Public domain */
+
+#include "Delta.h"
+
+void Delta_Init(Byte *state)
+{
+ unsigned i;
+ for (i = 0; i < DELTA_STATE_SIZE; i++)
+ state[i] = 0;
+}
+
+static void MyMemCpy(Byte *dest, const Byte *src, unsigned size)
+{
+ unsigned i;
+ for (i = 0; i < size; i++)
+ dest[i] = src[i];
+}
+
+void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size)
+{
+ Byte buf[DELTA_STATE_SIZE];
+ unsigned j = 0;
+ MyMemCpy(buf, state, delta);
+ {
+ SizeT i;
+ for (i = 0; i < size;)
+ {
+ for (j = 0; j < delta && i < size; i++, j++)
+ {
+ Byte b = data[i];
+ data[i] = (Byte)(b - buf[j]);
+ buf[j] = b;
+ }
+ }
+ }
+ if (j == delta)
+ j = 0;
+ MyMemCpy(state, buf + j, delta - j);
+ MyMemCpy(state + delta - j, buf, j);
+}
+
+void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size)
+{
+ Byte buf[DELTA_STATE_SIZE];
+ unsigned j = 0;
+ MyMemCpy(buf, state, delta);
+ {
+ SizeT i;
+ for (i = 0; i < size;)
+ {
+ for (j = 0; j < delta && i < size; i++, j++)
+ {
+ buf[j] = data[i] = (Byte)(buf[j] + data[i]);
+ }
+ }
+ }
+ if (j == delta)
+ j = 0;
+ MyMemCpy(state, buf + j, delta - j);
+ MyMemCpy(state + delta - j, buf, j);
+}
diff --git a/src/libs/7zip/unix/C/Delta.h b/src/libs/7zip/unix/C/Delta.h
new file mode 100644
index 000000000..0d4cd6274
--- /dev/null
+++ b/src/libs/7zip/unix/C/Delta.h
@@ -0,0 +1,23 @@
+/* Delta.h -- Delta converter
+2009-04-15 : Igor Pavlov : Public domain */
+
+#ifndef __DELTA_H
+#define __DELTA_H
+
+#include "Types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define DELTA_STATE_SIZE 256
+
+void Delta_Init(Byte *state);
+void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size);
+void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/libs/7zip/unix/C/HuffEnc.c b/src/libs/7zip/unix/C/HuffEnc.c
new file mode 100644
index 000000000..561c7e5da
--- /dev/null
+++ b/src/libs/7zip/unix/C/HuffEnc.c
@@ -0,0 +1,146 @@
+/* HuffEnc.c -- functions for Huffman encoding
+2009-09-02 : Igor Pavlov : Public domain */
+
+#include "HuffEnc.h"
+#include "Sort.h"
+
+#define kMaxLen 16
+#define NUM_BITS 10
+#define MASK ((1 << NUM_BITS) - 1)
+
+#define NUM_COUNTERS 64
+
+#define HUFFMAN_SPEED_OPT
+
+void Huffman_Generate(const UInt32 *freqs, UInt32 *p, Byte *lens, UInt32 numSymbols, UInt32 maxLen)
+{
+ UInt32 num = 0;
+ /* if (maxLen > 10) maxLen = 10; */
+ {
+ UInt32 i;
+
+ #ifdef HUFFMAN_SPEED_OPT
+
+ UInt32 counters[NUM_COUNTERS];
+ for (i = 0; i < NUM_COUNTERS; i++)
+ counters[i] = 0;
+ for (i = 0; i < numSymbols; i++)
+ {
+ UInt32 freq = freqs[i];
+ counters[(freq < NUM_COUNTERS - 1) ? freq : NUM_COUNTERS - 1]++;
+ }
+
+ for (i = 1; i < NUM_COUNTERS; i++)
+ {
+ UInt32 temp = counters[i];
+ counters[i] = num;
+ num += temp;
+ }
+
+ for (i = 0; i < numSymbols; i++)
+ {
+ UInt32 freq = freqs[i];
+ if (freq == 0)
+ lens[i] = 0;
+ else
+ p[counters[((freq < NUM_COUNTERS - 1) ? freq : NUM_COUNTERS - 1)]++] = i | (freq << NUM_BITS);
+ }
+ counters[0] = 0;
+ HeapSort(p + counters[NUM_COUNTERS - 2], counters[NUM_COUNTERS - 1] - counters[NUM_COUNTERS - 2]);
+
+ #else
+
+ for (i = 0; i < numSymbols; i++)
+ {
+ UInt32 freq = freqs[i];
+ if (freq == 0)
+ lens[i] = 0;
+ else
+ p[num++] = i | (freq << NUM_BITS);
+ }
+ HeapSort(p, num);
+
+ #endif
+ }
+
+ if (num < 2)
+ {
+ unsigned minCode = 0;
+ unsigned maxCode = 1;
+ if (num == 1)
+ {
+ maxCode = (unsigned)p[0] & MASK;
+ if (maxCode == 0)
+ maxCode++;
+ }
+ p[minCode] = 0;
+ p[maxCode] = 1;
+ lens[minCode] = lens[maxCode] = 1;
+ return;
+ }
+
+ {
+ UInt32 b, e, i;
+
+ i = b = e = 0;
+ do
+ {
+ UInt32 n, m, freq;
+ n = (i != num && (b == e || (p[i] >> NUM_BITS) <= (p[b] >> NUM_BITS))) ? i++ : b++;
+ freq = (p[n] & ~MASK);
+ p[n] = (p[n] & MASK) | (e << NUM_BITS);
+ m = (i != num && (b == e || (p[i] >> NUM_BITS) <= (p[b] >> NUM_BITS))) ? i++ : b++;
+ freq += (p[m] & ~MASK);
+ p[m] = (p[m] & MASK) | (e << NUM_BITS);
+ p[e] = (p[e] & MASK) | freq;
+ e++;
+ }
+ while (num - e > 1);
+
+ {
+ UInt32 lenCounters[kMaxLen + 1];
+ for (i = 0; i <= kMaxLen; i++)
+ lenCounters[i] = 0;
+
+ p[--e] &= MASK;
+ lenCounters[1] = 2;
+ while (e > 0)
+ {
+ UInt32 len = (p[p[--e] >> NUM_BITS] >> NUM_BITS) + 1;
+ p[e] = (p[e] & MASK) | (len << NUM_BITS);
+ if (len >= maxLen)
+ for (len = maxLen - 1; lenCounters[len] == 0; len--);
+ lenCounters[len]--;
+ lenCounters[len + 1] += 2;
+ }
+
+ {
+ UInt32 len;
+ i = 0;
+ for (len = maxLen; len != 0; len--)
+ {
+ UInt32 num;
+ for (num = lenCounters[len]; num != 0; num--)
+ lens[p[i++] & MASK] = (Byte)len;
+ }
+ }
+
+ {
+ UInt32 nextCodes[kMaxLen + 1];
+ {
+ UInt32 code = 0;
+ UInt32 len;
+ for (len = 1; len <= kMaxLen; len++)
+ nextCodes[len] = code = (code + lenCounters[len - 1]) << 1;
+ }
+ /* if (code + lenCounters[kMaxLen] - 1 != (1 << kMaxLen) - 1) throw 1; */
+
+ {
+ UInt32 i;
+ for (i = 0; i < numSymbols; i++)
+ p[i] = nextCodes[lens[i]]++;
+ }
+ }
+ }
+ }
+}
diff --git a/src/libs/7zip/unix/C/HuffEnc.h b/src/libs/7zip/unix/C/HuffEnc.h
new file mode 100644
index 000000000..9cf4bfde8
--- /dev/null
+++ b/src/libs/7zip/unix/C/HuffEnc.h
@@ -0,0 +1,27 @@
+/* HuffEnc.h -- Huffman encoding
+2009-02-07 : Igor Pavlov : Public domain */
+
+#ifndef __HUFF_ENC_H
+#define __HUFF_ENC_H
+
+#include "Types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+Conditions:
+ num <= 1024 = 2 ^ NUM_BITS
+ Sum(freqs) < 4M = 2 ^ (32 - NUM_BITS)
+ maxLen <= 16 = kMaxLen
+ Num_Items(p) >= HUFFMAN_TEMP_SIZE(num)
+*/
+
+void Huffman_Generate(const UInt32 *freqs, UInt32 *p, Byte *lens, UInt32 num, UInt32 maxLen);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/libs/7zip/unix/C/LzFind.c b/src/libs/7zip/unix/C/LzFind.c
new file mode 100644
index 000000000..e3ecb0542
--- /dev/null
+++ b/src/libs/7zip/unix/C/LzFind.c
@@ -0,0 +1,761 @@
+/* LzFind.c -- Match finder for LZ algorithms
+2009-04-22 : Igor Pavlov : Public domain */
+
+#include <string.h>
+
+#include "LzFind.h"
+#include "LzHash.h"
+
+#define kEmptyHashValue 0
+#define kMaxValForNormalize ((UInt32)0xFFFFFFFF)
+#define kNormalizeStepMin (1 << 10) /* it must be power of 2 */
+#define kNormalizeMask (~(kNormalizeStepMin - 1))
+#define kMaxHistorySize ((UInt32)3 << 30)
+
+#define kStartMaxLen 3
+
+static void LzInWindow_Free(CMatchFinder *p, ISzAlloc *alloc)
+{
+ if (!p->directInput)
+ {
+ alloc->Free(alloc, p->bufferBase);
+ p->bufferBase = 0;
+ }
+}
+
+/* keepSizeBefore + keepSizeAfter + keepSizeReserv must be < 4G) */
+
+static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAlloc *alloc)
+{
+ UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv;
+ if (p->directInput)
+ {
+ p->blockSize = blockSize;
+ return 1;
+ }
+ if (p->bufferBase == 0 || p->blockSize != blockSize)
+ {
+ LzInWindow_Free(p, alloc);
+ p->blockSize = blockSize;
+ p->bufferBase = (Byte *)alloc->Alloc(alloc, (size_t)blockSize);
+ }
+ return (p->bufferBase != 0);
+}
+
+Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; }
+Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->buffer[index]; }
+
+UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; }
+
+void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue)
+{
+ p->posLimit -= subValue;
+ p->pos -= subValue;
+ p->streamPos -= subValue;
+}
+
+static void MatchFinder_ReadBlock(CMatchFinder *p)
+{
+ if (p->streamEndWasReached || p->result != SZ_OK)
+ return;
+ if (p->directInput)
+ {
+ UInt32 curSize = 0xFFFFFFFF - p->streamPos;
+ if (curSize > p->directInputRem)
+ curSize = (UInt32)p->directInputRem;
+ p->directInputRem -= curSize;
+ p->streamPos += curSize;
+ if (p->directInputRem == 0)
+ p->streamEndWasReached = 1;
+ return;
+ }
+ for (;;)
+ {
+ Byte *dest = p->buffer + (p->streamPos - p->pos);
+ size_t size = (p->bufferBase + p->blockSize - dest);
+ if (size == 0)
+ return;
+ p->result = p->stream->Read(p->stream, dest, &size);
+ if (p->result != SZ_OK)
+ return;
+ if (size == 0)
+ {
+ p->streamEndWasReached = 1;
+ return;
+ }
+ p->streamPos += (UInt32)size;
+ if (p->streamPos - p->pos > p->keepSizeAfter)
+ return;
+ }
+}
+
+void MatchFinder_MoveBlock(CMatchFinder *p)
+{
+ memmove(p->bufferBase,
+ p->buffer - p->keepSizeBefore,
+ (size_t)(p->streamPos - p->pos + p->keepSizeBefore));
+ p->buffer = p->bufferBase + p->keepSizeBefore;
+}
+
+int MatchFinder_NeedMove(CMatchFinder *p)
+{
+ if (p->directInput)
+ return 0;
+ /* if (p->streamEndWasReached) return 0; */
+ return ((size_t)(p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter);
+}
+
+void MatchFinder_ReadIfRequired(CMatchFinder *p)
+{
+ if (p->streamEndWasReached)
+ return;
+ if (p->keepSizeAfter >= p->streamPos - p->pos)
+ MatchFinder_ReadBlock(p);
+}
+
+static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p)
+{
+ if (MatchFinder_NeedMove(p))
+ MatchFinder_MoveBlock(p);
+ MatchFinder_ReadBlock(p);
+}
+
+static void MatchFinder_SetDefaultSettings(CMatchFinder *p)
+{
+ p->cutValue = 32;
+ p->btMode = 1;
+ p->numHashBytes = 4;
+ p->bigHash = 0;
+}
+
+#define kCrcPoly 0xEDB88320
+
+void MatchFinder_Construct(CMatchFinder *p)
+{
+ UInt32 i;
+ p->bufferBase = 0;
+ p->directInput = 0;
+ p->hash = 0;
+ MatchFinder_SetDefaultSettings(p);
+
+ for (i = 0; i < 256; i++)
+ {
+ UInt32 r = i;
+ int j;
+ for (j = 0; j < 8; j++)
+ r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1));
+ p->crc[i] = r;
+ }
+}
+
+static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAlloc *alloc)
+{
+ alloc->Free(alloc, p->hash);
+ p->hash = 0;
+}
+
+void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc)
+{
+ MatchFinder_FreeThisClassMemory(p, alloc);
+ LzInWindow_Free(p, alloc);
+}
+
+static CLzRef* AllocRefs(UInt32 num, ISzAlloc *alloc)
+{
+ size_t sizeInBytes = (size_t)num * sizeof(CLzRef);
+ if (sizeInBytes / sizeof(CLzRef) != num)
+ return 0;
+ return (CLzRef *)alloc->Alloc(alloc, sizeInBytes);
+}
+
+int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
+ UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
+ ISzAlloc *alloc)
+{
+ UInt32 sizeReserv;
+ if (historySize > kMaxHistorySize)
+ {
+ MatchFinder_Free(p, alloc);
+ return 0;
+ }
+ sizeReserv = historySize >> 1;
+ if (historySize > ((UInt32)2 << 30))
+ sizeReserv = historySize >> 2;
+ sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19);
+
+ p->keepSizeBefore = historySize + keepAddBufferBefore + 1;
+ p->keepSizeAfter = matchMaxLen + keepAddBufferAfter;
+ /* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */
+ if (LzInWindow_Create(p, sizeReserv, alloc))
+ {
+ UInt32 newCyclicBufferSize = historySize + 1;
+ UInt32 hs;
+ p->matchMaxLen = matchMaxLen;
+ {
+ p->fixedHashSize = 0;
+ if (p->numHashBytes == 2)
+ hs = (1 << 16) - 1;
+ else
+ {
+ hs = historySize - 1;
+ hs |= (hs >> 1);
+ hs |= (hs >> 2);
+ hs |= (hs >> 4);
+ hs |= (hs >> 8);
+ hs >>= 1;
+ hs |= 0xFFFF; /* don't change it! It's required for Deflate */
+ if (hs > (1 << 24))
+ {
+ if (p->numHashBytes == 3)
+ hs = (1 << 24) - 1;
+ else
+ hs >>= 1;
+ }
+ }
+ p->hashMask = hs;
+ hs++;
+ if (p->numHashBytes > 2) p->fixedHashSize += kHash2Size;
+ if (p->numHashBytes > 3) p->fixedHashSize += kHash3Size;
+ if (p->numHashBytes > 4) p->fixedHashSize += kHash4Size;
+ hs += p->fixedHashSize;
+ }
+
+ {
+ UInt32 prevSize = p->hashSizeSum + p->numSons;
+ UInt32 newSize;
+ p->historySize = historySize;
+ p->hashSizeSum = hs;
+ p->cyclicBufferSize = newCyclicBufferSize;
+ p->numSons = (p->btMode ? newCyclicBufferSize * 2 : newCyclicBufferSize);
+ newSize = p->hashSizeSum + p->numSons;
+ if (p->hash != 0 && prevSize == newSize)
+ return 1;
+ MatchFinder_FreeThisClassMemory(p, alloc);
+ p->hash = AllocRefs(newSize, alloc);
+ if (p->hash != 0)
+ {
+ p->son = p->hash + p->hashSizeSum;
+ return 1;
+ }
+ }
+ }
+ MatchFinder_Free(p, alloc);
+ return 0;
+}
+
+static void MatchFinder_SetLimits(CMatchFinder *p)
+{
+ UInt32 limit = kMaxValForNormalize - p->pos;
+ UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos;
+ if (limit2 < limit)
+ limit = limit2;
+ limit2 = p->streamPos - p->pos;
+ if (limit2 <= p->keepSizeAfter)
+ {
+ if (limit2 > 0)
+ limit2 = 1;
+ }
+ else
+ limit2 -= p->keepSizeAfter;
+ if (limit2 < limit)
+ limit = limit2;
+ {
+ UInt32 lenLimit = p->streamPos - p->pos;
+ if (lenLimit > p->matchMaxLen)
+ lenLimit = p->matchMaxLen;
+ p->lenLimit = lenLimit;
+ }
+ p->posLimit = p->pos + limit;
+}
+
+void MatchFinder_Init(CMatchFinder *p)
+{
+ UInt32 i;
+ for (i = 0; i < p->hashSizeSum; i++)
+ p->hash[i] = kEmptyHashValue;
+ p->cyclicBufferPos = 0;
+ p->buffer = p->bufferBase;
+ p->pos = p->streamPos = p->cyclicBufferSize;
+ p->result = SZ_OK;
+ p->streamEndWasReached = 0;
+ MatchFinder_ReadBlock(p);
+ MatchFinder_SetLimits(p);
+}
+
+static UInt32 MatchFinder_GetSubValue(CMatchFinder *p)
+{
+ return (p->pos - p->historySize - 1) & kNormalizeMask;
+}
+
+void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems)
+{
+ UInt32 i;
+ for (i = 0; i < numItems; i++)
+ {
+ UInt32 value = items[i];
+ if (value <= subValue)
+ value = kEmptyHashValue;
+ else
+ value -= subValue;
+ items[i] = value;
+ }
+}
+
+static void MatchFinder_Normalize(CMatchFinder *p)
+{
+ UInt32 subValue = MatchFinder_GetSubValue(p);
+ MatchFinder_Normalize3(subValue, p->hash, p->hashSizeSum + p->numSons);
+ MatchFinder_ReduceOffsets(p, subValue);
+}
+
+static void MatchFinder_CheckLimits(CMatchFinder *p)
+{
+ if (p->pos == kMaxValForNormalize)
+ MatchFinder_Normalize(p);
+ if (!p->streamEndWasReached && p->keepSizeAfter == p->streamPos - p->pos)
+ MatchFinder_CheckAndMoveAndRead(p);
+ if (p->cyclicBufferPos == p->cyclicBufferSize)
+ p->cyclicBufferPos = 0;
+ MatchFinder_SetLimits(p);
+}
+
+static UInt32 * Hc_GetMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
+ UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
+ UInt32 *distances, UInt32 maxLen)
+{
+ son[_cyclicBufferPos] = curMatch;
+ for (;;)
+ {
+ UInt32 delta = pos - curMatch;
+ if (cutValue-- == 0 || delta >= _cyclicBufferSize)
+ return distances;
+ {
+ const Byte *pb = cur - delta;
+ curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)];
+ if (pb[maxLen] == cur[maxLen] && *pb == *cur)
+ {
+ UInt32 len = 0;
+ while (++len != lenLimit)
+ if (pb[len] != cur[len])
+ break;
+ if (maxLen < len)
+ {
+ *distances++ = maxLen = len;
+ *distances++ = delta - 1;
+ if (len == lenLimit)
+ return distances;
+ }
+ }
+ }
+ }
+}
+
+UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
+ UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
+ UInt32 *distances, UInt32 maxLen)
+{
+ CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1;
+ CLzRef *ptr1 = son + (_cyclicBufferPos << 1);
+ UInt32 len0 = 0, len1 = 0;
+ for (;;)
+ {
+ UInt32 delta = pos - curMatch;
+ if (cutValue-- == 0 || delta >= _cyclicBufferSize)
+ {
+ *ptr0 = *ptr1 = kEmptyHashValue;
+ return distances;
+ }
+ {
+ CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);
+ const Byte *pb = cur - delta;
+ UInt32 len = (len0 < len1 ? len0 : len1);
+ if (pb[len] == cur[len])
+ {
+ if (++len != lenLimit && pb[len] == cur[len])
+ while (++len != lenLimit)
+ if (pb[len] != cur[len])
+ break;
+ if (maxLen < len)
+ {
+ *distances++ = maxLen = len;
+ *distances++ = delta - 1;
+ if (len == lenLimit)
+ {
+ *ptr1 = pair[0];
+ *ptr0 = pair[1];
+ return distances;
+ }
+ }
+ }
+ if (pb[len] < cur[len])
+ {
+ *ptr1 = curMatch;
+ ptr1 = pair + 1;
+ curMatch = *ptr1;
+ len1 = len;
+ }
+ else
+ {
+ *ptr0 = curMatch;
+ ptr0 = pair;
+ curMatch = *ptr0;
+ len0 = len;
+ }
+ }
+ }
+}
+
+static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
+ UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue)
+{
+ CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1;
+ CLzRef *ptr1 = son + (_cyclicBufferPos << 1);
+ UInt32 len0 = 0, len1 = 0;
+ for (;;)
+ {
+ UInt32 delta = pos - curMatch;
+ if (cutValue-- == 0 || delta >= _cyclicBufferSize)
+ {
+ *ptr0 = *ptr1 = kEmptyHashValue;
+ return;
+ }
+ {
+ CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);
+ const Byte *pb = cur - delta;
+ UInt32 len = (len0 < len1 ? len0 : len1);
+ if (pb[len] == cur[len])
+ {
+ while (++len != lenLimit)
+ if (pb[len] != cur[len])
+ break;
+ {
+ if (len == lenLimit)
+ {
+ *ptr1 = pair[0];
+ *ptr0 = pair[1];
+ return;
+ }
+ }
+ }
+ if (pb[len] < cur[len])
+ {
+ *ptr1 = curMatch;
+ ptr1 = pair + 1;
+ curMatch = *ptr1;
+ len1 = len;
+ }
+ else
+ {
+ *ptr0 = curMatch;
+ ptr0 = pair;
+ curMatch = *ptr0;
+ len0 = len;
+ }
+ }
+ }
+}
+
+#define MOVE_POS \
+ ++p->cyclicBufferPos; \
+ p->buffer++; \
+ if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p);
+
+#define MOVE_POS_RET MOVE_POS return offset;
+
+static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; }
+
+#define GET_MATCHES_HEADER2(minLen, ret_op) \
+ UInt32 lenLimit; UInt32 hashValue; const Byte *cur; UInt32 curMatch; \
+ lenLimit = p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \
+ cur = p->buffer;
+
+#define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0)
+#define SKIP_HEADER(minLen) GET_MATCHES_HEADER2(minLen, continue)
+
+#define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue
+
+#define GET_MATCHES_FOOTER(offset, maxLen) \
+ offset = (UInt32)(GetMatchesSpec1(lenLimit, curMatch, MF_PARAMS(p), \
+ distances + offset, maxLen) - distances); MOVE_POS_RET;
+
+#define SKIP_FOOTER \
+ SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS;
+
+static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 offset;
+ GET_MATCHES_HEADER(2)
+ HASH2_CALC;
+ curMatch = p->hash[hashValue];
+ p->hash[hashValue] = p->pos;
+ offset = 0;
+ GET_MATCHES_FOOTER(offset, 1)
+}
+
+UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 offset;
+ GET_MATCHES_HEADER(3)
+ HASH_ZIP_CALC;
+ curMatch = p->hash[hashValue];
+ p->hash[hashValue] = p->pos;
+ offset = 0;
+ GET_MATCHES_FOOTER(offset, 2)
+}
+
+static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 hash2Value, delta2, maxLen, offset;
+ GET_MATCHES_HEADER(3)
+
+ HASH3_CALC;
+
+ delta2 = p->pos - p->hash[hash2Value];
+ curMatch = p->hash[kFix3HashSize + hashValue];
+
+ p->hash[hash2Value] =
+ p->hash[kFix3HashSize + hashValue] = p->pos;
+
+
+ maxLen = 2;
+ offset = 0;
+ if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
+ {
+ for (; maxLen != lenLimit; maxLen++)
+ if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
+ break;
+ distances[0] = maxLen;
+ distances[1] = delta2 - 1;
+ offset = 2;
+ if (maxLen == lenLimit)
+ {
+ SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p));
+ MOVE_POS_RET;
+ }
+ }
+ GET_MATCHES_FOOTER(offset, maxLen)
+}
+
+static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset;
+ GET_MATCHES_HEADER(4)
+
+ HASH4_CALC;
+
+ delta2 = p->pos - p->hash[ hash2Value];
+ delta3 = p->pos - p->hash[kFix3HashSize + hash3Value];
+ curMatch = p->hash[kFix4HashSize + hashValue];
+
+ p->hash[ hash2Value] =
+ p->hash[kFix3HashSize + hash3Value] =
+ p->hash[kFix4HashSize + hashValue] = p->pos;
+
+ maxLen = 1;
+ offset = 0;
+ if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
+ {
+ distances[0] = maxLen = 2;
+ distances[1] = delta2 - 1;
+ offset = 2;
+ }
+ if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur)
+ {
+ maxLen = 3;
+ distances[offset + 1] = delta3 - 1;
+ offset += 2;
+ delta2 = delta3;
+ }
+ if (offset != 0)
+ {
+ for (; maxLen != lenLimit; maxLen++)
+ if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
+ break;
+ distances[offset - 2] = maxLen;
+ if (maxLen == lenLimit)
+ {
+ SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p));
+ MOVE_POS_RET;
+ }
+ }
+ if (maxLen < 3)
+ maxLen = 3;
+ GET_MATCHES_FOOTER(offset, maxLen)
+}
+
+static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset;
+ GET_MATCHES_HEADER(4)
+
+ HASH4_CALC;
+
+ delta2 = p->pos - p->hash[ hash2Value];
+ delta3 = p->pos - p->hash[kFix3HashSize + hash3Value];
+ curMatch = p->hash[kFix4HashSize + hashValue];
+
+ p->hash[ hash2Value] =
+ p->hash[kFix3HashSize + hash3Value] =
+ p->hash[kFix4HashSize + hashValue] = p->pos;
+
+ maxLen = 1;
+ offset = 0;
+ if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
+ {
+ distances[0] = maxLen = 2;
+ distances[1] = delta2 - 1;
+ offset = 2;
+ }
+ if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur)
+ {
+ maxLen = 3;
+ distances[offset + 1] = delta3 - 1;
+ offset += 2;
+ delta2 = delta3;
+ }
+ if (offset != 0)
+ {
+ for (; maxLen != lenLimit; maxLen++)
+ if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
+ break;
+ distances[offset - 2] = maxLen;
+ if (maxLen == lenLimit)
+ {
+ p->son[p->cyclicBufferPos] = curMatch;
+ MOVE_POS_RET;
+ }
+ }
+ if (maxLen < 3)
+ maxLen = 3;
+ offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
+ distances + offset, maxLen) - (distances));
+ MOVE_POS_RET
+}
+
+UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 offset;
+ GET_MATCHES_HEADER(3)
+ HASH_ZIP_CALC;
+ curMatch = p->hash[hashValue];
+ p->hash[hashValue] = p->pos;
+ offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
+ distances, 2) - (distances));
+ MOVE_POS_RET
+}
+
+static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ SKIP_HEADER(2)
+ HASH2_CALC;
+ curMatch = p->hash[hashValue];
+ p->hash[hashValue] = p->pos;
+ SKIP_FOOTER
+ }
+ while (--num != 0);
+}
+
+void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ SKIP_HEADER(3)
+ HASH_ZIP_CALC;
+ curMatch = p->hash[hashValue];
+ p->hash[hashValue] = p->pos;
+ SKIP_FOOTER
+ }
+ while (--num != 0);
+}
+
+static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ UInt32 hash2Value;
+ SKIP_HEADER(3)
+ HASH3_CALC;
+ curMatch = p->hash[kFix3HashSize + hashValue];
+ p->hash[hash2Value] =
+ p->hash[kFix3HashSize + hashValue] = p->pos;
+ SKIP_FOOTER
+ }
+ while (--num != 0);
+}
+
+static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ UInt32 hash2Value, hash3Value;
+ SKIP_HEADER(4)
+ HASH4_CALC;
+ curMatch = p->hash[kFix4HashSize + hashValue];
+ p->hash[ hash2Value] =
+ p->hash[kFix3HashSize + hash3Value] = p->pos;
+ p->hash[kFix4HashSize + hashValue] = p->pos;
+ SKIP_FOOTER
+ }
+ while (--num != 0);
+}
+
+static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ UInt32 hash2Value, hash3Value;
+ SKIP_HEADER(4)
+ HASH4_CALC;
+ curMatch = p->hash[kFix4HashSize + hashValue];
+ p->hash[ hash2Value] =
+ p->hash[kFix3HashSize + hash3Value] =
+ p->hash[kFix4HashSize + hashValue] = p->pos;
+ p->son[p->cyclicBufferPos] = curMatch;
+ MOVE_POS
+ }
+ while (--num != 0);
+}
+
+void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ SKIP_HEADER(3)
+ HASH_ZIP_CALC;
+ curMatch = p->hash[hashValue];
+ p->hash[hashValue] = p->pos;
+ p->son[p->cyclicBufferPos] = curMatch;
+ MOVE_POS
+ }
+ while (--num != 0);
+}
+
+void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable)
+{
+ vTable->Init = (Mf_Init_Func)MatchFinder_Init;
+ vTable->GetIndexByte = (Mf_GetIndexByte_Func)MatchFinder_GetIndexByte;
+ vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes;
+ vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos;
+ if (!p->btMode)
+ {
+ vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches;
+ vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip;
+ }
+ else if (p->numHashBytes == 2)
+ {
+ vTable->GetMatches = (Mf_GetMatches_Func)Bt2_MatchFinder_GetMatches;
+ vTable->Skip = (Mf_Skip_Func)Bt2_MatchFinder_Skip;
+ }
+ else if (p->numHashBytes == 3)
+ {
+ vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches;
+ vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip;
+ }
+ else
+ {
+ vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches;
+ vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip;
+ }
+}
diff --git a/src/libs/7zip/unix/C/LzFind.h b/src/libs/7zip/unix/C/LzFind.h
new file mode 100644
index 000000000..010c4b92b
--- /dev/null
+++ b/src/libs/7zip/unix/C/LzFind.h
@@ -0,0 +1,115 @@
+/* LzFind.h -- Match finder for LZ algorithms
+2009-04-22 : Igor Pavlov : Public domain */
+
+#ifndef __LZ_FIND_H
+#define __LZ_FIND_H
+
+#include "Types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef UInt32 CLzRef;
+
+typedef struct _CMatchFinder
+{
+ Byte *buffer;
+ UInt32 pos;
+ UInt32 posLimit;
+ UInt32 streamPos;
+ UInt32 lenLimit;
+
+ UInt32 cyclicBufferPos;
+ UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */
+
+ UInt32 matchMaxLen;
+ CLzRef *hash;
+ CLzRef *son;
+ UInt32 hashMask;
+ UInt32 cutValue;
+
+ Byte *bufferBase;
+ ISeqInStream *stream;
+ int streamEndWasReached;
+
+ UInt32 blockSize;
+ UInt32 keepSizeBefore;
+ UInt32 keepSizeAfter;
+
+ UInt32 numHashBytes;
+ int directInput;
+ size_t directInputRem;
+ int btMode;
+ int bigHash;
+ UInt32 historySize;
+ UInt32 fixedHashSize;
+ UInt32 hashSizeSum;
+ UInt32 numSons;
+ SRes result;
+ UInt32 crc[256];
+} CMatchFinder;
+
+#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer)
+#define Inline_MatchFinder_GetIndexByte(p, index) ((p)->buffer[(Int32)(index)])
+
+#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos)
+
+int MatchFinder_NeedMove(CMatchFinder *p);
+Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p);
+void MatchFinder_MoveBlock(CMatchFinder *p);
+void MatchFinder_ReadIfRequired(CMatchFinder *p);
+
+void MatchFinder_Construct(CMatchFinder *p);
+
+/* Conditions:
+ historySize <= 3 GB
+ keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB
+*/
+int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
+ UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
+ ISzAlloc *alloc);
+void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc);
+void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems);
+void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue);
+
+UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son,
+ UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue,
+ UInt32 *distances, UInt32 maxLen);
+
+/*
+Conditions:
+ Mf_GetNumAvailableBytes_Func must be called before each Mf_GetMatchLen_Func.
+ Mf_GetPointerToCurrentPos_Func's result must be used only before any other function
+*/
+
+typedef void (*Mf_Init_Func)(void *object);
+typedef Byte (*Mf_GetIndexByte_Func)(void *object, Int32 index);
+typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object);
+typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object);
+typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances);
+typedef void (*Mf_Skip_Func)(void *object, UInt32);
+
+typedef struct _IMatchFinder
+{
+ Mf_Init_Func Init;
+ Mf_GetIndexByte_Func GetIndexByte;
+ Mf_GetNumAvailableBytes_Func GetNumAvailableBytes;
+ Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos;
+ Mf_GetMatches_Func GetMatches;
+ Mf_Skip_Func Skip;
+} IMatchFinder;
+
+void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable);
+
+void MatchFinder_Init(CMatchFinder *p);
+UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
+UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
+void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
+void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/libs/7zip/unix/C/LzFindMt.c b/src/libs/7zip/unix/C/LzFindMt.c
new file mode 100644
index 000000000..aa41ed98a
--- /dev/null
+++ b/src/libs/7zip/unix/C/LzFindMt.c
@@ -0,0 +1,793 @@
+/* LzFindMt.c -- multithreaded Match finder for LZ algorithms
+2009-09-20 : Igor Pavlov : Public domain */
+
+#include "LzHash.h"
+
+#include "LzFindMt.h"
+
+void MtSync_Construct(CMtSync *p)
+{
+ p->wasCreated = False;
+ p->csWasInitialized = False;
+ p->csWasEntered = False;
+ Thread_Construct(&p->thread);
+ Event_Construct(&p->canStart);
+ Event_Construct(&p->wasStarted);
+ Event_Construct(&p->wasStopped);
+ Semaphore_Construct(&p->freeSemaphore);
+ Semaphore_Construct(&p->filledSemaphore);
+}
+
+void MtSync_GetNextBlock(CMtSync *p)
+{
+ if (p->needStart)
+ {
+ p->numProcessedBlocks = 1;
+ p->needStart = False;
+ p->stopWriting = False;
+ p->exit = False;
+ Event_Reset(&p->wasStarted);
+ Event_Reset(&p->wasStopped);
+
+ Event_Set(&p->canStart);
+ Event_Wait(&p->wasStarted);
+ }
+ else
+ {
+ CriticalSection_Leave(&p->cs);
+ p->csWasEntered = False;
+ p->numProcessedBlocks++;
+ Semaphore_Release1(&p->freeSemaphore);
+ }
+ Semaphore_Wait(&p->filledSemaphore);
+ CriticalSection_Enter(&p->cs);
+ p->csWasEntered = True;
+}
+
+/* MtSync_StopWriting must be called if Writing was started */
+
+void MtSync_StopWriting(CMtSync *p)
+{
+ UInt32 myNumBlocks = p->numProcessedBlocks;
+ if (!Thread_WasCreated(&p->thread) || p->needStart)
+ return;
+ p->stopWriting = True;
+ if (p->csWasEntered)
+ {
+ CriticalSection_Leave(&p->cs);
+ p->csWasEntered = False;
+ }
+ Semaphore_Release1(&p->freeSemaphore);
+
+ Event_Wait(&p->wasStopped);
+
+ while (myNumBlocks++ != p->numProcessedBlocks)
+ {
+ Semaphore_Wait(&p->filledSemaphore);
+ Semaphore_Release1(&p->freeSemaphore);
+ }
+ p->needStart = True;
+}
+
+void MtSync_Destruct(CMtSync *p)
+{
+ if (Thread_WasCreated(&p->thread))
+ {
+ MtSync_StopWriting(p);
+ p->exit = True;
+ if (p->needStart)
+ Event_Set(&p->canStart);
+ Thread_Wait(&p->thread);
+ Thread_Close(&p->thread);
+ }
+ if (p->csWasInitialized)
+ {
+ CriticalSection_Delete(&p->cs);
+ p->csWasInitialized = False;
+ }
+
+ Event_Close(&p->canStart);
+ Event_Close(&p->wasStarted);
+ Event_Close(&p->wasStopped);
+ Semaphore_Close(&p->freeSemaphore);
+ Semaphore_Close(&p->filledSemaphore);
+
+ p->wasCreated = False;
+}
+
+#define RINOK_THREAD(x) { if ((x) != 0) return SZ_ERROR_THREAD; }
+
+static SRes MtSync_Create2(CMtSync *p, unsigned (MY_STD_CALL *startAddress)(void *), void *obj, UInt32 numBlocks)
+{
+ if (p->wasCreated)
+ return SZ_OK;
+
+ RINOK_THREAD(CriticalSection_Init(&p->cs));
+ p->csWasInitialized = True;
+
+ RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->canStart));
+ RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->wasStarted));
+ RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->wasStopped));
+
+ RINOK_THREAD(Semaphore_Create(&p->freeSemaphore, numBlocks, numBlocks));
+ RINOK_THREAD(Semaphore_Create(&p->filledSemaphore, 0, numBlocks));
+
+ p->needStart = True;
+
+ RINOK_THREAD(Thread_Create(&p->thread, startAddress, obj));
+ p->wasCreated = True;
+ return SZ_OK;
+}
+
+static SRes MtSync_Create(CMtSync *p, unsigned (MY_STD_CALL *startAddress)(void *), void *obj, UInt32 numBlocks)
+{
+ SRes res = MtSync_Create2(p, startAddress, obj, numBlocks);
+ if (res != SZ_OK)
+ MtSync_Destruct(p);
+ return res;
+}
+
+void MtSync_Init(CMtSync *p) { p->needStart = True; }
+
+#define kMtMaxValForNormalize 0xFFFFFFFF
+
+#define DEF_GetHeads2(name, v, action) \
+static void GetHeads ## name(const Byte *p, UInt32 pos, \
+UInt32 *hash, UInt32 hashMask, UInt32 *heads, UInt32 numHeads, const UInt32 *crc) \
+{ action; for (; numHeads != 0; numHeads--) { \
+const UInt32 value = (v); p++; *heads++ = pos - hash[value]; hash[value] = pos++; } }
+
+#define DEF_GetHeads(name, v) DEF_GetHeads2(name, v, ;)
+
+DEF_GetHeads2(2, (p[0] | ((UInt32)p[1] << 8)), hashMask = hashMask; crc = crc; )
+DEF_GetHeads(3, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8)) & hashMask)
+DEF_GetHeads(4, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8) ^ (crc[p[3]] << 5)) & hashMask)
+DEF_GetHeads(4b, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8) ^ ((UInt32)p[3] << 16)) & hashMask)
+/* DEF_GetHeads(5, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8) ^ (crc[p[3]] << 5) ^ (crc[p[4]] << 3)) & hashMask) */
+
+void HashThreadFunc(CMatchFinderMt *mt)
+{
+ CMtSync *p = &mt->hashSync;
+ for (;;)
+ {
+ UInt32 numProcessedBlocks = 0;
+ Event_Wait(&p->canStart);
+ Event_Set(&p->wasStarted);
+ for (;;)
+ {
+ if (p->exit)
+ return;
+ if (p->stopWriting)
+ {
+ p->numProcessedBlocks = numProcessedBlocks;
+ Event_Set(&p->wasStopped);
+ break;
+ }
+
+ {
+ CMatchFinder *mf = mt->MatchFinder;
+ if (MatchFinder_NeedMove(mf))
+ {
+ CriticalSection_Enter(&mt->btSync.cs);
+ CriticalSection_Enter(&mt->hashSync.cs);
+ {
+ const Byte *beforePtr = MatchFinder_GetPointerToCurrentPos(mf);
+ const Byte *afterPtr;
+ MatchFinder_MoveBlock(mf);
+ afterPtr = MatchFinder_GetPointerToCurrentPos(mf);
+ mt->pointerToCurPos -= beforePtr - afterPtr;
+ mt->buffer -= beforePtr - afterPtr;
+ }
+ CriticalSection_Leave(&mt->btSync.cs);
+ CriticalSection_Leave(&mt->hashSync.cs);
+ continue;
+ }
+
+ Semaphore_Wait(&p->freeSemaphore);
+
+ MatchFinder_ReadIfRequired(mf);
+ if (mf->pos > (kMtMaxValForNormalize - kMtHashBlockSize))
+ {
+ UInt32 subValue = (mf->pos - mf->historySize - 1);
+ MatchFinder_ReduceOffsets(mf, subValue);
+ MatchFinder_Normalize3(subValue, mf->hash + mf->fixedHashSize, mf->hashMask + 1);
+ }
+ {
+ UInt32 *heads = mt->hashBuf + ((numProcessedBlocks++) & kMtHashNumBlocksMask) * kMtHashBlockSize;
+ UInt32 num = mf->streamPos - mf->pos;
+ heads[0] = 2;
+ heads[1] = num;
+ if (num >= mf->numHashBytes)
+ {
+ num = num - mf->numHashBytes + 1;
+ if (num > kMtHashBlockSize - 2)
+ num = kMtHashBlockSize - 2;
+ mt->GetHeadsFunc(mf->buffer, mf->pos, mf->hash + mf->fixedHashSize, mf->hashMask, heads + 2, num, mf->crc);
+ heads[0] += num;
+ }
+ mf->pos += num;
+ mf->buffer += num;
+ }
+ }
+
+ Semaphore_Release1(&p->filledSemaphore);
+ }
+ }
+}
+
+void MatchFinderMt_GetNextBlock_Hash(CMatchFinderMt *p)
+{
+ MtSync_GetNextBlock(&p->hashSync);
+ p->hashBufPosLimit = p->hashBufPos = ((p->hashSync.numProcessedBlocks - 1) & kMtHashNumBlocksMask) * kMtHashBlockSize;
+ p->hashBufPosLimit += p->hashBuf[p->hashBufPos++];
+ p->hashNumAvail = p->hashBuf[p->hashBufPos++];
+}
+
+#define kEmptyHashValue 0
+
+/* #define MFMT_GM_INLINE */
+
+#ifdef MFMT_GM_INLINE
+
+#define NO_INLINE MY_FAST_CALL
+
+Int32 NO_INLINE GetMatchesSpecN(UInt32 lenLimit, UInt32 pos, const Byte *cur, CLzRef *son,
+ UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue,
+ UInt32 *_distances, UInt32 _maxLen, const UInt32 *hash, Int32 limit, UInt32 size, UInt32 *posRes)
+{
+ do
+ {
+ UInt32 *distances = _distances + 1;
+ UInt32 curMatch = pos - *hash++;
+
+ CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1;
+ CLzRef *ptr1 = son + (_cyclicBufferPos << 1);
+ UInt32 len0 = 0, len1 = 0;
+ UInt32 cutValue = _cutValue;
+ UInt32 maxLen = _maxLen;
+ for (;;)
+ {
+ UInt32 delta = pos - curMatch;
+ if (cutValue-- == 0 || delta >= _cyclicBufferSize)
+ {
+ *ptr0 = *ptr1 = kEmptyHashValue;
+ break;
+ }
+ {
+ CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);
+ const Byte *pb = cur - delta;
+ UInt32 len = (len0 < len1 ? len0 : len1);
+ if (pb[len] == cur[len])
+ {
+ if (++len != lenLimit && pb[len] == cur[len])
+ while (++len != lenLimit)
+ if (pb[len] != cur[len])
+ break;
+ if (maxLen < len)
+ {
+ *distances++ = maxLen = len;
+ *distances++ = delta - 1;
+ if (len == lenLimit)
+ {
+ *ptr1 = pair[0];
+ *ptr0 = pair[1];
+ break;
+ }
+ }
+ }
+ if (pb[len] < cur[len])
+ {
+ *ptr1 = curMatch;
+ ptr1 = pair + 1;
+ curMatch = *ptr1;
+ len1 = len;
+ }
+ else
+ {
+ *ptr0 = curMatch;
+ ptr0 = pair;
+ curMatch = *ptr0;
+ len0 = len;
+ }
+ }
+ }
+ pos++;
+ _cyclicBufferPos++;
+ cur++;
+ {
+ UInt32 num = (UInt32)(distances - _distances);
+ *_distances = num - 1;
+ _distances += num;
+ limit -= num;
+ }
+ }
+ while (limit > 0 && --size != 0);
+ *posRes = pos;
+ return limit;
+}
+
+#endif
+
+void BtGetMatches(CMatchFinderMt *p, UInt32 *distances)
+{
+ UInt32 numProcessed = 0;
+ UInt32 curPos = 2;
+ UInt32 limit = kMtBtBlockSize - (p->matchMaxLen * 2);
+ distances[1] = p->hashNumAvail;
+ while (curPos < limit)
+ {
+ if (p->hashBufPos == p->hashBufPosLimit)
+ {
+ MatchFinderMt_GetNextBlock_Hash(p);
+ distances[1] = numProcessed + p->hashNumAvail;
+ if (p->hashNumAvail >= p->numHashBytes)
+ continue;
+ for (; p->hashNumAvail != 0; p->hashNumAvail--)
+ distances[curPos++] = 0;
+ break;
+ }
+ {
+ UInt32 size = p->hashBufPosLimit - p->hashBufPos;
+ UInt32 lenLimit = p->matchMaxLen;
+ UInt32 pos = p->pos;
+ UInt32 cyclicBufferPos = p->cyclicBufferPos;
+ if (lenLimit >= p->hashNumAvail)
+ lenLimit = p->hashNumAvail;
+ {
+ UInt32 size2 = p->hashNumAvail - lenLimit + 1;
+ if (size2 < size)
+ size = size2;
+ size2 = p->cyclicBufferSize - cyclicBufferPos;
+ if (size2 < size)
+ size = size2;
+ }
+ #ifndef MFMT_GM_INLINE
+ while (curPos < limit && size-- != 0)
+ {
+ UInt32 *startDistances = distances + curPos;
+ UInt32 num = (UInt32)(GetMatchesSpec1(lenLimit, pos - p->hashBuf[p->hashBufPos++],
+ pos, p->buffer, p->son, cyclicBufferPos, p->cyclicBufferSize, p->cutValue,
+ startDistances + 1, p->numHashBytes - 1) - startDistances);
+ *startDistances = num - 1;
+ curPos += num;
+ cyclicBufferPos++;
+ pos++;
+ p->buffer++;
+ }
+ #else
+ {
+ UInt32 posRes;
+ curPos = limit - GetMatchesSpecN(lenLimit, pos, p->buffer, p->son, cyclicBufferPos, p->cyclicBufferSize, p->cutValue,
+ distances + curPos, p->numHashBytes - 1, p->hashBuf + p->hashBufPos, (Int32)(limit - curPos) , size, &posRes);
+ p->hashBufPos += posRes - pos;
+ cyclicBufferPos += posRes - pos;
+ p->buffer += posRes - pos;
+ pos = posRes;
+ }
+ #endif
+
+ numProcessed += pos - p->pos;
+ p->hashNumAvail -= pos - p->pos;
+ p->pos = pos;
+ if (cyclicBufferPos == p->cyclicBufferSize)
+ cyclicBufferPos = 0;
+ p->cyclicBufferPos = cyclicBufferPos;
+ }
+ }
+ distances[0] = curPos;
+}
+
+void BtFillBlock(CMatchFinderMt *p, UInt32 globalBlockIndex)
+{
+ CMtSync *sync = &p->hashSync;
+ if (!sync->needStart)
+ {
+ CriticalSection_Enter(&sync->cs);
+ sync->csWasEntered = True;
+ }
+
+ BtGetMatches(p, p->btBuf + (globalBlockIndex & kMtBtNumBlocksMask) * kMtBtBlockSize);
+