Skip to content

Commit

Permalink
21.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Pavlov authored and FnControlOption committed Nov 29, 2021
1 parent d789d41 commit 1194dc9
Show file tree
Hide file tree
Showing 152 changed files with 6,037 additions and 934 deletions.
4 changes: 3 additions & 1 deletion Asm/x86/7zAsm.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; 7zAsm.asm -- ASM macros
; 2021-07-13 : Igor Pavlov : Public domain
; 2021-08-29 : Igor Pavlov : Public domain

ifdef RAX
x64 equ 1
Expand Down Expand Up @@ -27,6 +27,8 @@ else
endif
endif

OPTION PROLOGUE:NONE
OPTION EPILOGUE:NONE

MY_ASM_START macro
ifdef x64
Expand Down
4 changes: 2 additions & 2 deletions Asm/x86/LzFindOpt.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; LzFindOpt.asm -- ASM version of GetMatchesSpecN_2() function
; 2021-07-13: Igor Pavlov : Public domain
; 2021-07-21: Igor Pavlov : Public domain
;

ifndef x64
Expand Down Expand Up @@ -475,7 +475,7 @@ long_loop:
je long_footer
cmp delta_x, [hash]
jne long_footer
movzx t0_x, BYTE PTR [diff + cur]
movzx t0_x, BYTE PTR [diff + 1 * cur]
cmp [cur], t0_L
jne long_footer
cmp d, d_lim
Expand Down
6 changes: 3 additions & 3 deletions C/7zVersion.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#define MY_VER_MAJOR 21
#define MY_VER_MINOR 03
#define MY_VER_MINOR 04
#define MY_VER_BUILD 0
#define MY_VERSION_NUMBERS "21.03 beta"
#define MY_VERSION_NUMBERS "21.04 beta"
#define MY_VERSION MY_VERSION_NUMBERS

#ifdef MY_CPU_NAME
Expand All @@ -10,7 +10,7 @@
#define MY_VERSION_CPU MY_VERSION
#endif

#define MY_DATE "2021-07-20"
#define MY_DATE "2021-11-02"
#undef MY_COPYRIGHT
#undef MY_VERSION_COPYRIGHT_DATE
#define MY_AUTHOR_NAME "Igor Pavlov"
Expand Down
2 changes: 2 additions & 0 deletions C/7zip_gcc_c.mak
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ $O/LzFind.o: ../../../C/LzFind.c
# ifdef MT_FILES
$O/LzFindMt.o: ../../../C/LzFindMt.c
$(CC) $(CFLAGS) $<
$O/LzFindOpt.o: ../../../C/LzFindOpt.c
$(CC) $(CFLAGS) $<

$O/Threads.o: ../../../C/Threads.c
$(CC) $(CFLAGS) $<
Expand Down
8 changes: 4 additions & 4 deletions C/LzFind.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* LzFind.c -- Match finder for LZ algorithms
2021-07-12 : Igor Pavlov : Public domain */
2021-09-03 : Igor Pavlov : Public domain */

#include "Precomp.h"

Expand Down Expand Up @@ -1592,7 +1592,7 @@ void LzFindPrepare()
{
if (CPU_IsSupported_NEON())
{
#pragma message ("=== LzFind NEON")
// #pragma message ("=== LzFind NEON")
_PRF(printf("\n=== LzFind NEON\n"));
f = LzFind_SaturSub_128;
}
Expand All @@ -1601,14 +1601,14 @@ void LzFindPrepare()
#else // MY_CPU_ARM_OR_ARM64
if (CPU_IsSupported_SSE41())
{
#pragma message ("=== LzFind SSE41")
// #pragma message ("=== LzFind SSE41")
_PRF(printf("\n=== LzFind SSE41\n"));
f = LzFind_SaturSub_128;

#ifdef USE_AVX2
if (CPU_IsSupported_AVX2())
{
#pragma message ("=== LzFind AVX2")
// #pragma message ("=== LzFind AVX2")
_PRF(printf("\n=== LzFind AVX2\n"));
f = LzFind_SaturSub_256;
}
Expand Down
5 changes: 4 additions & 1 deletion C/Util/7zipInstall/7zipInstall.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* 7zipInstall.c - 7-Zip Installer
2021-02-23 : Igor Pavlov : Public domain */
2021-09-02 : Igor Pavlov : Public domain */

#include "Precomp.h"

Expand Down Expand Up @@ -926,6 +926,9 @@ static void WriteShellEx()
wcscpy(destPath + 1, path);
CatAscii(destPath, "Uninstall.exe\"");
MyRegistry_SetString(destKey, L"UninstallString", destPath);

CatAscii(destPath, " /S");
MyRegistry_SetString(destKey, L"QuietUninstallString", destPath);

MyRegistry_SetDWORD(destKey, L"NoModify", 1);
MyRegistry_SetDWORD(destKey, L"NoRepair", 1);
Expand Down
7 changes: 5 additions & 2 deletions C/Util/Lzma/LzmaUtil.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* LzmaUtil.c -- Test application for LZMA compression
2021-02-15 : Igor Pavlov : Public domain */
2021-11-01 : Igor Pavlov : Public domain */

#include "../../Precomp.h"

Expand All @@ -12,6 +12,7 @@
#include "../../Alloc.h"
#include "../../7zFile.h"
#include "../../7zVersion.h"
#include "../../LzFind.h"
#include "../../LzmaDec.h"
#include "../../LzmaEnc.h"

Expand Down Expand Up @@ -195,6 +196,8 @@ static int main2(int numArgs, const char *args[], char *rs)
int encodeMode;
BoolInt useOutFile = False;

LzFindPrepare();

FileSeqInStream_CreateVTable(&inStream);
File_Construct(&inStream.file);
inStream.wres = 0;
Expand Down Expand Up @@ -276,7 +279,7 @@ static int main2(int numArgs, const char *args[], char *rs)

int MY_CDECL main(int numArgs, const char *args[])
{
char rs[800] = { 0 };
char rs[1000] = { 0 };
int res = main2(numArgs, args, rs);
fputs(rs, stdout);
return res;
Expand Down
4 changes: 4 additions & 0 deletions C/Util/Lzma/LzmaUtil.dsp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions C/Util/Lzma/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ LIB_OBJS = \

C_OBJS = \
$O\Alloc.obj \
$O\CpuArch.obj \
$O\LzFind.obj \
$O\LzFindMt.obj \
$O\LzFindOpt.obj \
$O\LzmaDec.obj \
$O\LzmaEnc.obj \
$O\7zFile.obj \
Expand Down
2 changes: 2 additions & 0 deletions C/Util/Lzma/makefile.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ OBJS = \
$O/7zFile.o \
$O/7zStream.o \
$O/Alloc.o \
$O/CpuArch.o \
$O/LzFind.o \
$O/LzFindMt.o \
$O/LzFindOpt.o \
$O/LzmaDec.o \
$O/LzmaEnc.o \
$O/LzmaUtil.o \
Expand Down
1 change: 1 addition & 0 deletions C/Util/LzmaLib/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ LIB_OBJS = \

C_OBJS = \
$O\Alloc.obj \
$O\CpuArch.obj \
$O\LzFind.obj \
$O\LzFindMt.obj \
$O\LzFindOpt.obj \
Expand Down
5 changes: 3 additions & 2 deletions C/XzDec.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* XzDec.c -- Xz Decode
2021-04-01 : Igor Pavlov : Public domain */
2021-09-04 : Igor Pavlov : Public domain */

#include "Precomp.h"

Expand Down Expand Up @@ -773,7 +773,8 @@ static BoolInt Xz_CheckFooter(CXzStreamFlags flags, UInt64 indexSize, const Byte

#define READ_VARINT_AND_CHECK(buf, pos, size, res) \
{ unsigned s = Xz_ReadVarInt(buf + pos, size - pos, res); \
if (s == 0) return SZ_ERROR_ARCHIVE; pos += s; }
if (s == 0) return SZ_ERROR_ARCHIVE; \
pos += s; }


static BoolInt XzBlock_AreSupportedFilters(const CXzBlock *p)
Expand Down
5 changes: 3 additions & 2 deletions C/XzIn.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* XzIn.c - Xz input
2021-04-01 : Igor Pavlov : Public domain */
2021-09-04 : Igor Pavlov : Public domain */

#include "Precomp.h"

Expand All @@ -26,7 +26,8 @@ SRes Xz_ReadHeader(CXzStreamFlags *p, ISeqInStream *inStream)

#define READ_VARINT_AND_CHECK(buf, pos, size, res) \
{ unsigned s = Xz_ReadVarInt(buf + pos, size - pos, res); \
if (s == 0) return SZ_ERROR_ARCHIVE; pos += s; }
if (s == 0) return SZ_ERROR_ARCHIVE; \
pos += s; }

SRes XzBlock_ReadHeader(CXzBlock *p, ISeqInStream *inStream, BoolInt *isIndex, UInt32 *headerSizeRes)
{
Expand Down
11 changes: 10 additions & 1 deletion CPP/7zip/Archive/7z/7zCompressionMode.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ struct CMethodFull: public CMethodProps
CMethodId Id;
UInt32 NumStreams;
int CodecIndex;
UInt32 NumThreads;
bool Set_NumThreads;

CMethodFull(): CodecIndex(-1) {}
CMethodFull(): CodecIndex(-1), NumThreads(1), Set_NumThreads(false) {}
bool IsSimpleCoder() const { return NumStreams == 1; }
};

Expand Down Expand Up @@ -53,8 +55,12 @@ struct CCompressionMethodMode

#ifndef _7ZIP_ST
UInt32 NumThreads;
bool NumThreads_WasForced;
bool MultiThreadMixer;
#endif

UInt64 MemoryUsageLimit;
bool MemoryUsageLimit_WasSet;

bool PasswordIsDefined;
UString Password; // _Wipe
Expand All @@ -65,8 +71,11 @@ struct CCompressionMethodMode
, Filter_was_Inserted(false)
#ifndef _7ZIP_ST
, NumThreads(1)
, NumThreads_WasForced(false)
, MultiThreadMixer(true)
#endif
, MemoryUsageLimit((UInt64)1 << 30)
, MemoryUsageLimit_WasSet(false)
, PasswordIsDefined(false)
{}

Expand Down
6 changes: 5 additions & 1 deletion CPP/7zip/Archive/7z/7zEncode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,16 @@ HRESULT CEncoder::CreateMixerCoder(
CMyComPtr<IUnknown> encoderCommon = cod.Coder ? (IUnknown *)cod.Coder : (IUnknown *)cod.Coder2;

#ifndef _7ZIP_ST
if (methodFull.Set_NumThreads)
{
CMyComPtr<ICompressSetCoderMt> setCoderMt;
encoderCommon.QueryInterface(IID_ICompressSetCoderMt, &setCoderMt);
if (setCoderMt)
{
RINOK(setCoderMt->SetNumberOfThreads(_options.NumThreads));
RINOK(setCoderMt->SetNumberOfThreads(
/* _options.NumThreads */
methodFull.NumThreads
));
}
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion CPP/7zip/Archive/7z/7zExtract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,

_7Z_DECODER_CRYPRO_VARS
#if !defined(_7ZIP_ST)
, true, _numThreads, _memUsage
, true, _numThreads, _memUsage_Decompress
#endif
);

Expand Down
7 changes: 1 addition & 6 deletions CPP/7zip/Archive/7z/7zHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,7 @@ class CHandler:

HRESULT PropsMethod_To_FullMethod(CMethodFull &dest, const COneMethodInfo &m);
HRESULT SetHeaderMethod(CCompressionMethodMode &headerMethod);
HRESULT SetMainMethod(CCompressionMethodMode &method
#ifndef _7ZIP_ST
, UInt32 numThreads
#endif
);

HRESULT SetMainMethod(CCompressionMethodMode &method);

#endif

Expand Down
Loading

0 comments on commit 1194dc9

Please sign in to comment.