Skip to content

Commit

Permalink
Merge branch 'main' into extract7zippage
Browse files Browse the repository at this point in the history
# Conflicts:
#	Projects/Src/Compression.SevenZipDecoder/7zDecode/IS7zDec.obj
  • Loading branch information
martijnlaan committed Nov 14, 2024
2 parents b7efc08 + 2d3b2f4 commit 5bf562b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions Components/Lzma2/Util/7z/7zMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,15 +537,18 @@ static void PrintError_WRes(const char *message, WRes wres)
}

#ifdef REPORT_OUTBUFFERSIZE
static void PrintInt(const char *message, UInt64 value)
static void PrintInt(const char *message, UInt64 value, const char *message2, const BOOL lf)
{
Print(message);
{
char s[32];
UInt64ToStr(value, s, 1);
Print(s);
}
PrintLF();
if (message2)
Print(message2);
if (lf)
PrintLF();
}
#endif

Expand Down Expand Up @@ -786,10 +789,19 @@ int Z7_CDECL mainW(int numargs, WCHAR *args[])
if (res != SZ_OK)
break;
#ifdef REPORT_OUTBUFFERSIZE
if (prevOutBufferSize == -1 || outBufferSize != prevOutBufferSize)
if (prevOutBufferSize == -1 || outBufferSize > prevOutBufferSize) /* only report increasing buffer sizes */
{
PrintLF();
PrintInt("Used new buffer size ", outBufferSize);
PrintInt("Used new increased buffer size: ", outBufferSize, " bytes", False);
if (outBufferSize > 1024)
{
size_t friendlySize = (outBufferSize + 512) / 1024;
if (friendlySize > 1024)
PrintInt(" (", (friendlySize + 512 ) / 1024, " mb)", False);
else
PrintInt(" (", friendlySize, " kb)", False);
}
PrintLF();
prevOutBufferSize = outBufferSize;
}
#endif
Expand Down
Binary file modified Projects/Src/Compression.SevenZipDecoder/7zDecode/IS7zDec.obj
Binary file not shown.

0 comments on commit 5bf562b

Please sign in to comment.