diff -Nru lrzip-0.631+git180528/ChangeLog lrzip-0.631+git200516/ChangeLog --- lrzip-0.631+git180528/ChangeLog 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/ChangeLog 2020-05-16 07:56:08.000000000 +0000 @@ -1,5 +1,13 @@ lrzip ChangeLog +NOVEMBER 2019, updates to version 0.631, Peter Hyman + +* Fixups to Assembler code in configure.ac lzma/C/Makefile.am by using +optimized code from p7zip LZMA SDK 16.02. Now works for 64 and 32 bit using +one optimized source. Hack to allow libtool to compile and link assembler +code. + + JUNE 2016, version 0.630 Con Kolivas, Peter Hyman, Petr Písař, Joel Fredrikson * checksum.buf should only be changed after the semaphore wait diff -Nru lrzip-0.631+git180528/configure.ac lrzip-0.631+git200516/configure.ac --- lrzip-0.631+git180528/configure.ac 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/configure.ac 2020-05-16 07:56:08.000000000 +0000 @@ -51,23 +51,25 @@ AC_PROG_LN_S AC_SUBST(SHELL) AC_SYS_LARGEFILE +AC_FUNC_FSEEKO AC_FUNC_ALLOCA AC_PROG_CC_C99 -AS_IF([test "x$ac_cv_prog_cc_c99" = "xno"], +AS_IF([test x"$ac_cv_prog_cc_c99" = x"no"], AC_MSG_ERROR([C compiler does not support C99], 1)) AC_CHECK_PROG([HAVE_POD2MAN], [pod2man], [yes]) AS_IF([test "$HAVE_POD2MAN" != "yes"], AC_MSG_FAILURE([pod2man is needed to generate manual from POD])) - AC_ARG_ENABLE( +AC_ARG_ENABLE( asm, [AC_HELP_STRING([--enable-asm],[Enable native Assembly code])], ASM=$enableval, ASM=yes ) -if test x"$ASM" = xyes; then - AC_CHECK_PROG( ASM_PROG, nasm, yes, no ) + +if test x"$ASM" = x"yes"; then + AC_CHECK_PROG( ASM_PROG, nasm, nasm, no ) # fix to set ASM_PROG to nasm, not yes. if test x"$ASM_PROG" = x"no "; then ASM=no fi @@ -78,7 +80,7 @@ [AC_HELP_STRING([--enable-static-bin],[Build statically linked binary @<:@default=no@:>@])], [static=$enableval] ) -AM_CONDITIONAL([STATIC], [test "x$static" = "xyes"]) +AM_CONDITIONAL([STATIC], [test x"$static" = x"yes"]) AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/mman.h) AC_CHECK_HEADERS(ctype.h errno.h sys/resource.h) @@ -92,12 +94,6 @@ AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(short) -if test $ac_cv_sizeof_long != 4 -a "x$ASM" = "xyes" ; then - AC_MSG_WARN([64bit arch detected, disabling ASM]) - ASM=no -fi - - AC_CACHE_CHECK([for large file support],rzip_cv_HAVE_LARGE_FILES,[ AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include @@ -125,24 +121,28 @@ AC_CHECK_FUNCS(mmap strerror) AC_CHECK_FUNCS(getopt_long) -# final checks for x86 and/or assembler -if test x"$ASM" = x"no"; then - ASM_OBJ=7zCrc.o - ASM=no -else +AX_PTHREAD +LIBS="$PTHREAD_LIBS $LIBS" +CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS" + +# final checks for assembler +# ASM is back for x86_64 by using newer CRC code from p7zip-16.02 +# object files handled in lzma/C/Makefile.am +if test x"$ASM" = x"yes"; then + ASM_OPT="-I../ASM/x86/" case $host in i?86-*) - ASM_OBJ="7zCrcT8.o 7zCrcT8U.o" - ASM_CMD="$ASM_PROG -f elf" ;; -# x86_64 code is broken still -# x86_64-*) -# ASM_OBJ="7zCrcT8.o 7zCrcT8U_64.o" -# ASM_CMD="$ASM_PROG -f elf64" ;; - *) ASM_OBJ=7zCrc.o ;; + ASM_OPT="$ASM_OPT -f elf" ;; + x86_64-*) + ASM_OPT="$ASM_OPT -Dx64 -f elf64" ;; + *) ASM_OPT= ;; esac +else + ASM_OPT= fi -AM_CONDITIONAL([USE_ASM], [test "x$ASM" != "xyes" -a "x$ASM" != "xno"]) -AC_SUBST([ASM_OBJ]) +AM_CONDITIONAL([USE_ASM], [test x"$ASM" = x"yes"]) +AC_SUBST([ASM_OPT]) AC_SUBST([ASM_CMD]) EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"]) @@ -166,7 +166,7 @@ echo echo "Configuration Options Summary:" echo -echo " ASM.(32 bit only)..: $ASM" +echo " ASM................: $ASM" echo " Static binary......: $static" echo echo "Documentation..........: ${build_doc}" diff -Nru lrzip-0.631+git180528/debian/changelog lrzip-0.631+git200516/debian/changelog --- lrzip-0.631+git180528/debian/changelog 2020-03-22 15:48:26.000000000 +0000 +++ lrzip-0.631+git200516/debian/changelog 2020-05-16 07:59:26.000000000 +0000 @@ -1,8 +1,11 @@ -lrzip (0.631+git180528-1build1) focal; urgency=medium +lrzip (0.631+git200516-1) unstable; urgency=medium - * No-change rebuild for libgcc-s1 package name change. + * Git snapshot release. + * Update watch file. + * Update debhelper level to 12 . + * Update Standards-Version to 4.5.0 . - -- Matthias Klose Sun, 22 Mar 2020 16:48:26 +0100 + -- Laszlo Boszormenyi (GCS) Sat, 16 May 2020 07:59:26 +0000 lrzip (0.631+git180528-1) unstable; urgency=high diff -Nru lrzip-0.631+git180528/debian/compat lrzip-0.631+git200516/debian/compat --- lrzip-0.631+git180528/debian/compat 2018-05-17 15:42:06.000000000 +0000 +++ lrzip-0.631+git200516/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -11 diff -Nru lrzip-0.631+git180528/debian/control lrzip-0.631+git200516/debian/control --- lrzip-0.631+git180528/debian/control 2018-05-17 15:42:06.000000000 +0000 +++ lrzip-0.631+git200516/debian/control 2020-05-16 07:59:26.000000000 +0000 @@ -2,10 +2,8 @@ Section: utils Priority: optional Maintainer: Laszlo Boszormenyi (GCS) -Build-Depends: debhelper (>= 11), automake, autoconf, libtool, zlib1g-dev, libbz2-dev, liblzo2-dev -Standards-Version: 4.1.4 -#Vcs-Browser: http://git.debian.org/?p=collab-maint/lrzip.git -#Vcs-Git: git://git.debian.org/git/collab-maint/lrzip.git +Build-Depends: debhelper-compat (= 12), automake, autoconf, libtool, zlib1g-dev, libbz2-dev, liblzo2-dev +Standards-Version: 4.5.0 Homepage: http://ck.kolivas.org/apps/lrzip/README.md Package: lrzip diff -Nru lrzip-0.631+git180528/debian/copyright lrzip-0.631+git200516/debian/copyright --- lrzip-0.631+git180528/debian/copyright 2018-05-17 15:42:06.000000000 +0000 +++ lrzip-0.631+git200516/debian/copyright 2020-05-16 07:59:26.000000000 +0000 @@ -1,5 +1,5 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -X-Format: http://dep.debian.net/deps/dep5 +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +X-Format: https://dep.debian.net/deps/dep5 Upstream-Name: lrzip Upstream-Contact: Con Kolivas Source: https://github.com/ckolivas/lrzip @@ -42,14 +42,14 @@ The ASM code compiling has been disables in this debian package, so file ./C/7zCrcT8.c is not used. X-License-Comment: - [from http://www.7-zip.org/sdk.html] + [from https://www.7-zip.org/sdk.html] "License: LZMA SDK is placed in the public domain." . [from lzma/README] JANUARY 2009 . This is an updated LZMA library wrapper provided with SDK 4.63. - The SDK is available here: http://www.7-zip.org/sdk.html. + The SDK is available here: https://www.7-zip.org/sdk.html. . It is written completely in C and compilation and integration is much simpler. To enable multithreading support, compile @@ -69,7 +69,7 @@ by Oleg I. Vdovikin and modified for lrzip by Con Kolivas It is based on a stripped down source tree of the lzma SDK by Igor Pavlov. - http://www.7-zip.org + https://www.7-zip.org . You can build a standalone library called liblzma.a which gives functions equivalent to compress2() and uncompress() called lzma_compress() and @@ -114,7 +114,7 @@ GNU General Public License for more details. . You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in "/usr/share/common-licenses/GPL-2". @@ -131,7 +131,7 @@ GNU General Public License for more details. . You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in "/usr/share/common-licenses/GPL-3". diff -Nru lrzip-0.631+git180528/debian/patches/dir_if_not_exists.patch lrzip-0.631+git200516/debian/patches/dir_if_not_exists.patch --- lrzip-0.631+git180528/debian/patches/dir_if_not_exists.patch 1970-01-01 00:00:00.000000000 +0000 +++ lrzip-0.631+git200516/debian/patches/dir_if_not_exists.patch 2020-05-16 07:59:26.000000000 +0000 @@ -0,0 +1,19 @@ +Description: only create .libs if needed + . +Author: Laszlo Boszormenyi (GCS) +Forwarded: no +Last-Update: 2020-05-16 + +--- + +--- lrzip-0.631+git200516.orig/lzma/C/Makefile.am ++++ lrzip-0.631+git200516/lzma/C/Makefile.am +@@ -60,7 +60,7 @@ liblzma_la_LIBADD = $(ASM_7z).lo + + $(ASM_7z).lo: $(ASM_S) + $(ASM_PROG) $(ASM_OPT) -o $(ASM_7z).o $(ASM_S) +- mkdir .libs ++ [ -e .libs ] || mkdir .libs + cp $(ASM_7z).o .libs/ + @echo -e "$(7ZIPASMLOFILE)" > $(ASM_7z).lo + endif diff -Nru lrzip-0.631+git180528/debian/patches/series lrzip-0.631+git200516/debian/patches/series --- lrzip-0.631+git180528/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ lrzip-0.631+git200516/debian/patches/series 2020-05-16 07:59:26.000000000 +0000 @@ -0,0 +1 @@ +dir_if_not_exists.patch diff -Nru lrzip-0.631+git180528/debian/watch lrzip-0.631+git200516/debian/watch --- lrzip-0.631+git180528/debian/watch 2012-02-08 22:25:47.000000000 +0000 +++ lrzip-0.631+git200516/debian/watch 2020-05-16 07:59:26.000000000 +0000 @@ -1,2 +1,2 @@ -version=3 -http://ck.kolivas.org/apps/lrzip/ lrzip-(\d.+)\.tar\.bz2 debian debian/repack.sh +version=4 +http://ck.kolivas.org/apps/lrzip/ lrzip-(?:[_\-]v?|)(\d\.\d+\.[1-9]+|\d\.\d+)\.(?:tar\.xz|txz|tar\.bz2|tbz2|tar\.gz|tgz) debian debian/repack.sh diff -Nru lrzip-0.631+git180528/doc/lrzip.conf.example lrzip-0.631+git200516/doc/lrzip.conf.example --- lrzip-0.631+git180528/doc/lrzip.conf.example 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/doc/lrzip.conf.example 2020-05-16 07:56:08.000000000 +0000 @@ -1,55 +1,47 @@ # lrzip.conf example file # anything beginning with a # or whitespace will be ignored # valid parameters are separated with an = and a value -# parameters and values are not case sensitive +# parameters and values are not case sensitive except where specified # # lrzip 0.24+, peter hyman, pete@peterhyman.com # ignored by earlier versions. -# Compression Window size in 100MB. Normally selected by program. +# Compression Window size in 100MB. Normally selected by program. (-w) # WINDOW = 20 - -# Compression Level 1-9 (7 Default). +# Compression Level 1-9 (7 Default). (-L) # COMPRESSIONLEVEL = 7 - # Use -U setting, Unlimited ram. Yes or No # UNLIMITED = NO - -# Compression Method, rzip, gzip, bzip2, lzo, or lzma (default), or zpaq. -# If specified here, command line options not usable. +# Compression Method, rzip, gzip, bzip2, lzo, or lzma (default), or zpaq. (-n -g -b -l --lzma -z) +# May be overriden by command line compression choice. # COMPRESSIONMETHOD = lzma - -# Perform LZO Test. Default = YES (-T option, NO) +# Perform LZO Test. Default = YES (-T ) # LZOTEST = NO - -# Hash Check on decompression, YES +# Hash Check on decompression, (-c) # HASHCHECK = YES - -# Show HASH value on Compression even if Verbose is off, YES +# Show HASH value on Compression even if Verbose is off, YES (-H) # SHOWHASH = YES -# Default output directory +# Default output directory (-O) # OUTPUTDIRECTORY = location - -# Verbosity, Yes or Max +# Verbosity, YES or MAX (v, vv) # VERBOSITY = max +# Show Progress as file is parsed, YES or no (NO = -q option) +# SHOWPROGRESS = YES -# Show Progress as file is parsed, Yes or no -# SHOWPROGRESS = true - -# Set Niceness. 19 is default. -20 to 19 is the allowable range +# Set Niceness. 19 is default. -20 to 19 is the allowable range (-N) # NICE = 19 -# Keep broken or damaged output files, YES +# Keep broken or damaged output files, YES (-K) # KEEPBROKEN = YES -# Delete source file after compression +# Delete source file after compression (-D) # this parameter and value are case sensitive # value must be YES to activate # DELETEFILES = NO -# Replace existing lrzip file when compressing +# Replace existing lrzip file when compressing (-f) # this parameter and value are case sensitive # value must be YES to activate @@ -58,6 +50,6 @@ # Override for Temporary Directory. Only valid when stdin/out or Test is used # TMPDIR = /tmp +# Whether to use encryption on compression YES, NO (-e) # ENCRYPT = NO -# Whether to use encryption on compression \ No newline at end of file diff -Nru lrzip-0.631+git180528/doc/README.Assembler lrzip-0.631+git200516/doc/README.Assembler --- lrzip-0.631+git180528/doc/README.Assembler 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/doc/README.Assembler 2020-05-16 07:56:08.000000000 +0000 @@ -1,5 +1,20 @@ README.Assembler +Update November 2019 + +Assembler is enabled by +./configure --enable-asm +and disabled by +./configure --disable-asm +not +ASM=no ./configure + +New files replace 32 and 64 bit assembler code. +fixes to lzma/C/Makefile.am permit libtool linking. + +Original text follows. +========================== + Notes about CRC Assembly Language Coding. lrzip-0.21 makes use of an x86 assembly language file diff -Nru lrzip-0.631+git180528/lrzip.c lrzip-0.631+git200516/lrzip.c --- lrzip-0.631+git180528/lrzip.c 2018-05-29 14:36:49.000000000 +0000 +++ lrzip-0.631+git200516/lrzip.c 2020-05-16 07:56:08.000000000 +0000 @@ -950,6 +950,7 @@ char chunk_byte = 0; long double cratio; uchar ctype = 0; + uchar save_ctype = 255; struct stat st; int fd_in; @@ -1080,6 +1081,11 @@ print_verbose("zpaq"); else print_verbose("Dunno wtf"); + if (save_ctype == 255) + save_ctype = ctype; /* need this for lzma when some chunks could have no compression + * and info will show rzip + none on info display if last chunk + * is not compressed. Adjust for all types in case it's used in + * the future */ utotal += u_len; ctotal += c_len; print_verbose("\t%.1f%%\t%lld / %lld", percentage(c_len, u_len), c_len, u_len); @@ -1133,17 +1139,17 @@ print_output("%s:\nlrzip version: %d.%d file\n", infilecopy, control->major_version, control->minor_version); print_output("Compression: "); - if (ctype == CTYPE_NONE) + if (save_ctype == CTYPE_NONE) print_output("rzip alone\n"); - else if (ctype == CTYPE_BZIP2) + else if (save_ctype == CTYPE_BZIP2) print_output("rzip + bzip2\n"); - else if (ctype == CTYPE_LZO) + else if (save_ctype == CTYPE_LZO) print_output("rzip + lzo\n"); - else if (ctype == CTYPE_LZMA) + else if (save_ctype == CTYPE_LZMA) print_output("rzip + lzma\n"); - else if (ctype == CTYPE_GZIP) + else if (save_ctype == CTYPE_GZIP) print_output("rzip + gzip\n"); - else if (ctype == CTYPE_ZPAQ) + else if (save_ctype == CTYPE_ZPAQ) print_output("rzip + zpaq\n"); else print_output("Dunno wtf\n"); diff -Nru lrzip-0.631+git180528/lrzip_core.h lrzip-0.631+git200516/lrzip_core.h --- lrzip-0.631+git180528/lrzip_core.h 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/lrzip_core.h 2020-05-16 07:56:08.000000000 +0000 @@ -47,4 +47,5 @@ FILE *msgout, bool progress, long thread); extern void zpaq_decompress(uchar *s_buf, i64 *d_len, uchar *c_buf, i64 c_len, FILE *msgout, bool progress, long thread); + #endif diff -Nru lrzip-0.631+git180528/Lrzip.h lrzip-0.631+git200516/Lrzip.h --- lrzip-0.631+git180528/Lrzip.h 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/Lrzip.h 2020-05-16 07:56:08.000000000 +0000 @@ -20,6 +20,7 @@ #ifndef LIBLRZIP_H #define LIBLRZIP_H +#include #include #include #ifdef _WIN32 diff -Nru lrzip-0.631+git180528/lrzip_private.h lrzip-0.631+git200516/lrzip_private.h --- lrzip-0.631+git180528/lrzip_private.h 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/lrzip_private.h 2020-05-16 07:56:08.000000000 +0000 @@ -144,7 +144,7 @@ #define unlikely(x) __builtin_expect(!!(x), 0) #define __maybe_unused __attribute__((unused)) -#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(ANDROID) || defined(__APPLE__) +#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__ANDROID__) || defined(__APPLE__) # define ffsll __builtin_ffsll #endif @@ -412,6 +412,7 @@ i64 max_mmap; int threads; char nice_val; // added for consistency + int current_priority; char major_version; char minor_version; i64 st_size; diff -Nru lrzip-0.631+git180528/lrztar lrzip-0.631+git200516/lrztar --- lrzip-0.631+git180528/lrztar 2018-05-29 14:36:49.000000000 +0000 +++ lrzip-0.631+git200516/lrztar 2020-05-16 07:56:08.000000000 +0000 @@ -137,11 +137,13 @@ s="${s%/}" p+=(-o "$i/${s##*/}.tar.${vopt[v_S]}"); fi - ! ((v_f)) && [[ -e $i/${s##*/}.tar.${vopt[v_S]} ]] && { - printf "lrztar: %s exists, use -f to overwrite\n" \ - "$i/${s##*/}.tar.${vopt[v_S]}" - return 1 - } + if ! ((v_o)); then + ! ((v_f)) && [[ -e $i/${s##*/}.tar.${vopt[v_S]} ]] && { + printf "lrztar: %s exists, use -f to overwrite\n" \ + "$i/${s##*/}.tar.${vopt[v_S]}" + return 1 + } + fi tar c "$s" | lrzip "${p[@]}" x=$? } diff -Nru lrzip-0.631+git180528/lzma/ASM/x86/7zAsm.asm lrzip-0.631+git200516/lzma/ASM/x86/7zAsm.asm --- lrzip-0.631+git180528/lzma/ASM/x86/7zAsm.asm 1970-01-01 00:00:00.000000000 +0000 +++ lrzip-0.631+git200516/lzma/ASM/x86/7zAsm.asm 2020-05-16 07:56:08.000000000 +0000 @@ -0,0 +1,100 @@ +; 7zAsm.asm -- ASM macros +; 2009-12-12 : Igor Pavlov : Public domain +; 2011-10-12 : P7ZIP : Public domain + +%define NOT ~ + +%macro MY_ASM_START 0 + SECTION .text +%endmacro + +%macro MY_PROC 2 ; macro name:req, numParams:req + align 16 + %define proc_numParams %2 ; numParams + global %1 + global _%1 + %1: + _%1: +%endmacro + +%macro MY_ENDP 0 + %ifdef x64 + ret + ; proc_name ENDP + %else + ret ; (proc_numParams - 2) * 4 + %endif +%endmacro + +%ifdef x64 + REG_SIZE equ 8 +%else + REG_SIZE equ 4 +%endif + + %define x0 EAX + %define x1 ECX + %define x2 EDX + %define x3 EBX + %define x4 ESP + %define x5 EBP + %define x6 ESI + %define x7 EDI + + %define x0_L AL + %define x1_L CL + %define x2_L DL + %define x3_L BL + + %define x0_H AH + %define x1_H CH + %define x2_H DH + %define x3_H BH + +%ifdef x64 + %define r0 RAX + %define r1 RCX + %define r2 RDX + %define r3 RBX + %define r4 RSP + %define r5 RBP + %define r6 RSI + %define r7 RDI +%else + %define r0 x0 + %define r1 x1 + %define r2 x2 + %define r3 x3 + %define r4 x4 + %define r5 x5 + %define r6 x6 + %define r7 x7 +%endif + +%macro MY_PUSH_4_REGS 0 + push r3 + push r5 +%ifdef x64 + %ifdef CYGWIN64 + push r6 + push r7 + %endif +%else + push r6 + push r7 +%endif +%endmacro + +%macro MY_POP_4_REGS 0 +%ifdef x64 + %ifdef CYGWIN64 + pop r7 + pop r6 + %endif +%else + pop r7 + pop r6 +%endif + pop r5 + pop r3 +%endmacro diff -Nru lrzip-0.631+git180528/lzma/ASM/x86/7zCrcOpt_asm.asm lrzip-0.631+git200516/lzma/ASM/x86/7zCrcOpt_asm.asm --- lrzip-0.631+git180528/lzma/ASM/x86/7zCrcOpt_asm.asm 1970-01-01 00:00:00.000000000 +0000 +++ lrzip-0.631+git200516/lzma/ASM/x86/7zCrcOpt_asm.asm 2020-05-16 07:56:08.000000000 +0000 @@ -0,0 +1,141 @@ +; 7zCrcOpt.asm -- CRC32 calculation : optimized version +; 2009-12-12 : Igor Pavlov : Public domain + +%include "7zAsm.asm" + +MY_ASM_START + +%define rD r2 +%define rN r7 + +%ifdef x64 + %define num_VAR r8 + %define table_VAR r9 +%else + data_size equ (REG_SIZE * 7) + crc_table equ (REG_SIZE + data_size) + %define num_VAR [r4 + data_size] + %define table_VAR [r4 + crc_table] +%endif + +%define SRCDAT rN + rD + 4 * + +%macro CRC 4 ;CRC macro op:req, dest:req, src:req, t:req + %1 %2, DWORD [r5 + %3 * 4 + 0400h * %4] ; op dest, DWORD [r5 + src * 4 + 0400h * t] +%endmacro + +%macro CRC_XOR 3 ; CRC_XOR macro dest:req, src:req, t:req + CRC xor, %1, %2, %3 +%endmacro + +%macro CRC_MOV 3 ; CRC_MOV macro dest:req, src:req, t:req + CRC mov, %1, %2, %3 ; CRC mov, dest, src, t +%endmacro + +%macro CRC1b 0 + movzx x6, BYTE [rD] + inc rD + movzx x3, x0_L + xor x6, x3 + shr x0, 8 + CRC xor, x0, r6, 0 + dec rN +%endmacro + +%macro MY_PROLOG 1 ; MY_PROLOG macro crc_end:req + MY_PUSH_4_REGS + + +%ifdef x64 + %ifdef CYGWIN64 + ;ECX=CRC, RDX=buf, R8=size R9=table + ; already in R8 : mov num_VAR,R8 ; LEN + ; already in RDX : mov rD, RDX ; BUF + ; already in R9 : mov table_VAR,R9; table + mov x0, ECX ; CRC + %else + ;EDI=CRC, RSI=buf, RDX=size RCX=table + mov num_VAR,RDX ; LEN + mov rD, RSI ; BUF + mov table_VAR,RCX; table + mov x0, EDI ; CRC + %endif +%else + mov x0, [r4 + 20] ; CRC + mov rD, [r4 + 24] ; buf +%endif + mov rN, num_VAR + mov r5, table_VAR + test rN, rN + jz near %1 ; crc_end + %%sl: + test rD, 7 + jz %%sl_end + CRC1b + jnz %%sl + %%sl_end: + cmp rN, 16 + jb near %1; crc_end + add rN, rD + mov num_VAR, rN + sub rN, 8 + and rN, NOT 7 + sub rD, rN + xor x0, [SRCDAT 0] +%endmacro + +%macro MY_EPILOG 1 ; MY_EPILOG macro crc_end:req + xor x0, [SRCDAT 0] + mov rD, rN + mov rN, num_VAR + sub rN, rD + %1: ; crc_end: + test rN, rN + jz %%end ; @F + CRC1b + jmp %1 ; crc_end + %%end: + MY_POP_4_REGS +%endmacro + +MY_PROC CrcUpdateT8, 4 + MY_PROLOG crc_end_8 + mov x1, [SRCDAT 1] + align 16 + main_loop_8: + mov x6, [SRCDAT 2] + movzx x3, x1_L + CRC_XOR x6, r3, 3 + movzx x3, x1_H + CRC_XOR x6, r3, 2 + shr x1, 16 + movzx x3, x1_L + movzx x1, x1_H + CRC_XOR x6, r3, 1 + movzx x3, x0_L + CRC_XOR x6, r1, 0 + + mov x1, [SRCDAT 3] + CRC_XOR x6, r3, 7 + movzx x3, x0_H + shr x0, 16 + CRC_XOR x6, r3, 6 + movzx x3, x0_L + CRC_XOR x6, r3, 5 + movzx x3, x0_H + CRC_MOV x0, r3, 4 + xor x0, x6 + add rD, 8 + jnz main_loop_8 + + MY_EPILOG crc_end_8 +MY_ENDP + +; T4 CRC deleted + +; end + +%ifidn __OUTPUT_FORMAT__,elf +section .note.GNU-stack noalloc noexec nowrite progbits +%endif + diff -Nru lrzip-0.631+git180528/lzma/ASM/x86/7zCrcT8U.s lrzip-0.631+git200516/lzma/ASM/x86/7zCrcT8U.s --- lrzip-0.631+git180528/lzma/ASM/x86/7zCrcT8U.s 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/lzma/ASM/x86/7zCrcT8U.s 1970-01-01 00:00:00.000000000 +0000 @@ -1,102 +0,0 @@ - -SECTION .text - -%macro CRC1b 0 - movzx EDX, BYTE [ESI] - inc ESI - movzx EBX, AL - xor EDX, EBX - shr EAX, 8 - xor EAX, [EBP + EDX * 4] - dec EDI -%endmacro - -data_size equ (28) -crc_table equ (data_size + 4) - - align 16 - global CrcUpdateT8 - global _CrcUpdateT8 -CrcUpdateT8: -_CrcUpdateT8: - push EBX - push ESI - push EDI - push EBP - - mov EAX, [ESP + 20] - mov ESI, [ESP + 24] - mov EDI, [ESP + data_size] - mov EBP, [ESP + crc_table] - - test EDI, EDI - jz sl_end - sl: - test ESI, 7 - jz sl_end - CRC1b - jnz sl - sl_end: - - cmp EDI, 16 - jb NEAR crc_end - mov [ESP + data_size], EDI - sub EDI, 8 - and EDI, ~ 7 - sub [ESP + data_size], EDI - - add EDI, ESI - xor EAX, [ESI] - mov EBX, [ESI + 4] - movzx ECX, BL - align 16 - main_loop: - mov EDX, [EBP + ECX*4 + 0C00h] - movzx ECX, BH - xor EDX, [EBP + ECX*4 + 0800h] - shr EBX, 16 - movzx ECX, BL - xor EDX, [EBP + ECX*4 + 0400h] - xor EDX, [ESI + 8] - movzx ECX, AL - movzx EBX, BH - xor EDX, [EBP + EBX*4 + 0000h] - - mov EBX, [ESI + 12] - - xor EDX, [EBP + ECX*4 + 01C00h] - movzx ECX, AH - add ESI, 8 - shr EAX, 16 - xor EDX, [EBP + ECX*4 + 01800h] - movzx ECX, AL - xor EDX, [EBP + ECX*4 + 01400h] - movzx ECX, AH - mov EAX, [EBP + ECX*4 + 01000h] - movzx ECX, BL - xor EAX,EDX - - cmp ESI, EDI - jne main_loop - xor EAX, [ESI] - - mov EDI, [ESP + data_size] - - crc_end: - - test EDI, EDI - jz fl_end - fl: - CRC1b - jnz fl - fl_end: - - pop EBP - pop EDI - pop ESI - pop EBX - ret - -%ifidn __OUTPUT_FORMAT__,elf - section .note.GNU-stack noalloc noexec nowrite progbits -%endif diff -Nru lrzip-0.631+git180528/lzma/ASM/x86_64/7zCrcT8U_64.s lrzip-0.631+git200516/lzma/ASM/x86_64/7zCrcT8U_64.s --- lrzip-0.631+git180528/lzma/ASM/x86_64/7zCrcT8U_64.s 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/lzma/ASM/x86_64/7zCrcT8U_64.s 1970-01-01 00:00:00.000000000 +0000 @@ -1,105 +0,0 @@ - -SECTION .text - - - - -%macro CRC1b 0 - movzx EDX, BYTE [RSI] - inc RSI - movzx EBX, AL - xor EDX, EBX - shr EAX, 8 - xor EAX, [RDI + RDX * 4] - dec R8 -%endmacro - - - - -align 16 -global CrcUpdateT8 - -CrcUpdateT8: - - push RBX - push RSI - push RDI - push RBP - - mov EAX, ECX - mov RSI, RDX - mov RDI, R9 - - - test R8, R8 - jz sl_end - sl: - test RSI, 7 - jz sl_end - CRC1b - jnz sl - sl_end: - - cmp R8, 16 - jb crc_end - mov R9, R8 - and R8, 7 - add R8, 8 - sub R9, R8 - - add R9, RSI - xor EAX, [RSI] - mov EBX, [RSI + 4] - movzx ECX, BL - align 16 - main_loop: - mov EDX, [RDI + RCX*4 + 0C00h] - movzx EBP, BH - xor EDX, [RDI + RBP*4 + 0800h] - shr EBX, 16 - movzx ECX, BL - xor EDX, [RSI + 8] - xor EDX, [RDI + RCX*4 + 0400h] - movzx ECX, AL - movzx EBP, BH - xor EDX, [RDI + RBP*4 + 0000h] - - mov EBX, [RSI + 12] - - xor EDX, [RDI + RCX*4 + 01C00h] - movzx EBP, AH - shr EAX, 16 - movzx ECX, AL - xor EDX, [RDI + RBP*4 + 01800h] - movzx EBP, AH - mov EAX, [RDI + RCX*4 + 01400h] - add RSI, 8 - xor EAX, [RDI + RBP*4 + 01000h] - movzx ECX, BL - xor EAX,EDX - - cmp RSI, R9 - jne main_loop - xor EAX, [RSI] - - - - crc_end: - - test R8, R8 - jz fl_end - fl: - CRC1b - jnz fl - fl_end: - - pop RBP - pop RDI - pop RSI - pop RBX - ret - -%ifidn __OUTPUT_FORMAT__,elf - section .note.GNU-stack noalloc noexec nowrite progbits -%endif diff -Nru lrzip-0.631+git180528/lzma/C/Makefile.am lrzip-0.631+git200516/lzma/C/Makefile.am --- lrzip-0.631+git180528/lzma/C/Makefile.am 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/lzma/C/Makefile.am 2020-05-16 07:56:08.000000000 +0000 @@ -1,22 +1,30 @@ MAINTAINERCLEANFILES = Makefile.in +# Update -D AM_CFLAGS = \ - -DCOMPRESS_MF_MT \ -D_REENTRANT \ -I@top_builddir@ \ -I@top_srcdir@ -ASM_LIBS = ASM_S = +ASM_H = +ASM_7z = +C_S = if USE_ASM - ASM_LIBS += @ASM_OBJ@ + ASM_7z += 7zCrcOpt_asm + ASM_S += @top_srcdir@/lzma/ASM/x86/$(ASM_7z).asm + ASM_H += @top_srcdir@/lzma/ASM/x86/7zAsm.asm + C_S += 7zCrcT8.c else - ASM_S += 7zCrc.c 7zCrc.h + C_S += 7zCrc.c endif noinst_LTLIBRARIES = liblzma.la +# need separate variable for ASM so that make will compile later +# to prevent an error even if -j## is used. liblzma_la_SOURCES = \ - $(ASM_S) \ + $(C_S) \ + 7z.Crc.h \ LzmaDec.h \ LzmaEnc.h \ LzFind.c \ @@ -36,11 +44,23 @@ windows.h \ basetyps.h \ MyWindows.h \ - MyGuidDef.h -liblzma_so_LIBS = $(ASM_LIBS) + MyGuidDef.h \ + $(ASM_S) $(ASM_H) -7zCrcT8U.o: @top_srcdir@/lzma/ASM/x86/7zCrcT8U.s - @ASM_CMD@ -o 7zCrcT8U.o @top_srcdir@/lzma/ASM/x86/7zCrcT8U.s +## hack to force asm compilation and to trick libtool with .lo file +if USE_ASM +liblzma_la_LIBADD = $(ASM_7z).lo -7zCrcT8U_64.o: @top_srcdir@/lzma/ASM/x86_64/7zCrcT8U_64.s - @ASM_CMD@ -o 7zCrcT8U_64.o @top_srcdir@/lzma/ASM/x86_64/7zCrcT8U_64.s +7ZIPASMLOFILE := \ +\# $(ASM_7z).lo - a libtool object file\ +\n\# Generated by libtool -- hack to allow asm linking\ +\n\# Peter Hyman\ +\npic_object='.libs/$(ASM_7z).o'\ +\nnon_pic_object='$(ASM_7z).o' + +$(ASM_7z).lo: $(ASM_S) + $(ASM_PROG) $(ASM_OPT) -o $(ASM_7z).o $(ASM_S) + mkdir .libs + cp $(ASM_7z).o .libs/ + @echo -e "$(7ZIPASMLOFILE)" > $(ASM_7z).lo +endif diff -Nru lrzip-0.631+git180528/m4/ax_pthread.m4 lrzip-0.631+git200516/m4/ax_pthread.m4 --- lrzip-0.631+git180528/m4/ax_pthread.m4 1970-01-01 00:00:00.000000000 +0000 +++ lrzip-0.631+git200516/m4/ax_pthread.m4 2020-05-16 07:56:08.000000000 +0000 @@ -0,0 +1,486 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_pthread.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# This macro figures out how to build C programs using POSIX threads. It +# sets the PTHREAD_LIBS output variable to the threads library and linker +# flags, and the PTHREAD_CFLAGS output variable to any special C compiler +# flags that are needed. (The user can also force certain compiler +# flags/libs to be tested by setting these environment variables.) +# +# Also sets PTHREAD_CC to any special C compiler that is needed for +# multi-threaded programs (defaults to the value of CC otherwise). (This +# is necessary on AIX to use the special cc_r compiler alias.) +# +# NOTE: You are assumed to not only compile your program with these flags, +# but also to link with them as well. For example, you might link with +# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# +# If you are only building threaded programs, you may wish to use these +# variables in your default LIBS, CFLAGS, and CC: +# +# LIBS="$PTHREAD_LIBS $LIBS" +# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CC="$PTHREAD_CC" +# +# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant +# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to +# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# +# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the +# PTHREAD_PRIO_INHERIT symbol is defined when compiling with +# PTHREAD_CFLAGS. +# +# ACTION-IF-FOUND is a list of shell commands to run if a threads library +# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it +# is not found. If ACTION-IF-FOUND is not specified, the default action +# will define HAVE_PTHREAD. +# +# Please let the authors know if this macro fails on any platform, or if +# you have any other suggestions or comments. This macro was based on work +# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help +# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by +# Alejandro Forero Cuervo to the autoconf macro repository. We are also +# grateful for the helpful feedback of numerous users. +# +# Updated for Autoconf 2.68 by Daniel Richard G. +# +# LICENSE +# +# Copyright (c) 2008 Steven G. Johnson +# Copyright (c) 2011 Daniel Richard G. +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 25 + +AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) +AC_DEFUN([AX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_SED]) +AC_LANG_PUSH([C]) +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on Tru64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) + AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) + AC_MSG_RESULT([$ax_pthread_ok]) + if test "x$ax_pthread_ok" = "xno"; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case $host_os in + + freebsd*) + + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) + + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + + hpux*) + + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." + + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; + + openedition*) + + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) + + AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], + [ +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif + ], + [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) + ;; + + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). + + ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" + ;; +esac + +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) + +AS_IF([test "x$GCC" = "xyes"], + [ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"]) + +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" + ;; + + aix*) + ax_pthread_check_macro="_THREAD_SAFE" + ;; + + *) + ax_pthread_check_macro="--" + ;; +esac +AS_IF([test "x$ax_pthread_check_macro" = "x--"], + [ax_pthread_check_cond=0], + [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) + +# Are we compiling with Clang? + +AC_CACHE_CHECK([whether $CC is Clang], + [ax_cv_PTHREAD_CLANG], + [ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], + [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + ], + [ax_cv_PTHREAD_CLANG=yes]) + fi + ]) +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + +ax_pthread_clang_warning=no + +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way + +if test "x$ax_pthread_clang" = "xyes"; then + + # Clang takes -pthread; it has never supported any other flag + + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) + + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) + + PTHREAD_CFLAGS="-pthread" + PTHREAD_LIBS= + + ax_pthread_ok=yes + + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + + AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [ac_link="$ax_pthread_2step_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [break]) + ]) + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" + ]) + + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac + +fi # $ax_pthread_clang = yes + +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do + + case $ax_pthread_try_flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -mt,pthread) + AC_MSG_CHECKING([whether pthreads work with -mt -lpthread]) + PTHREAD_CFLAGS="-mt" + PTHREAD_LIBS="-lpthread" + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) + PTHREAD_CFLAGS="$ax_pthread_try_flag" + ;; + + pthread-config) + AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) + AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) + PTHREAD_LIBS="-l$ax_pthread_try_flag" + ;; + esac + + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void routine(void *a) { a = 0; } + static void *start_routine(void *a) { return a; }], + [pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */])], + [ax_pthread_ok=yes], + []) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + AC_MSG_RESULT([$ax_pthread_ok]) + AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + AC_CACHE_CHECK([for joinable pthread attribute], + [ax_cv_PTHREAD_JOINABLE_ATTR], + [ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [int attr = $ax_pthread_attr; return attr /* ; */])], + [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], + []) + done + ]) + AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes"], + [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], + [$ax_cv_PTHREAD_JOINABLE_ATTR], + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + ax_pthread_joinable_attr_defined=yes + ]) + + AC_CACHE_CHECK([whether more special flags are required for pthreads], + [ax_cv_PTHREAD_SPECIAL_FLAGS], + [ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + ]) + AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes"], + [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes]) + + AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], + [ax_cv_PTHREAD_PRIO_INHERIT], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[int i = PTHREAD_PRIO_INHERIT; + return i;]])], + [ax_cv_PTHREAD_PRIO_INHERIT=yes], + [ax_cv_PTHREAD_PRIO_INHERIT=no]) + ]) + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes"], + [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) + ax_pthread_prio_inherit_defined=yes + ]) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != "xyes"; then + case $host_os in + aix*) + AS_CASE(["x/$CC"], + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], + [#handle absolute path differently from PATH based program lookup + AS_CASE(["x$CC"], + [x/*], + [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], + [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + +AC_SUBST([PTHREAD_LIBS]) +AC_SUBST([PTHREAD_CFLAGS]) +AC_SUBST([PTHREAD_CC]) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test "x$ax_pthread_ok" = "xyes"; then + ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) + : +else + ax_pthread_ok=no + $2 +fi +AC_LANG_POP +])dnl AX_PTHREAD diff -Nru lrzip-0.631+git180528/main.c lrzip-0.631+git200516/main.c --- lrzip-0.631+git180528/main.c 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/main.c 2020-05-16 07:56:08.000000000 +0000 @@ -308,6 +308,7 @@ int main(int argc, char *argv[]) { bool lrzcat = false, compat = false, recurse = false; + bool options_file = false, conf_file_compression_set = false; /* for environment and tracking of compression setting */ struct timeval start_time, end_time; struct sigaction handler; double seconds,total_time; // for timers @@ -342,19 +343,48 @@ /* Get Preloaded Defaults from lrzip.conf * Look in ., $HOME/.lrzip/, /etc/lrzip. * If LRZIP=NOCONFIG is set, then ignore config + * If lrzip.conf sets a compression mode, options_file will be true. + * This will allow for a test to permit an override of compression mode. + * If there is an override, then all compression settings will be reset + * and command line switches will prevail, including for --lzma. */ eptr = getenv("LRZIP"); if (eptr == NULL) - read_config(control); + options_file = read_config(control); else if (!strstr(eptr,"NOCONFIG")) - read_config(control); + options_file = read_config(control); + if (options_file && (control->flags & FLAG_NOT_LZMA)) /* if some compression set in lrzip.conf */ + conf_file_compression_set = true; /* need this to allow command line override */ while ((c = getopt_long(argc, argv, compat ? coptions : loptions, long_options, &i)) != -1) { switch (c) { case 'b': - if (control->flags & FLAG_NOT_LZMA) + case 'g': + case 'l': + case 'n': + case 'z': + /* If some compression was chosen in lrzip.conf, allow this one time + * because conf_file_compression_set will be true + */ + if ((control->flags & FLAG_NOT_LZMA) && conf_file_compression_set == false) failure("Can only use one of -l, -b, -g, -z or -n\n"); - control->flags |= FLAG_BZIP2_COMPRESS; + /* Select Compression Mode */ + control->flags &= ~FLAG_NOT_LZMA; /* must clear all compressions first */ + if (c == 'b') + control->flags |= FLAG_BZIP2_COMPRESS; + else if (c == 'g') + control->flags |= FLAG_ZLIB_COMPRESS; + else if (c == 'l') + control->flags |= FLAG_LZO_COMPRESS; + else if (c == 'n') + control->flags |= FLAG_NO_COMPRESS; + else if (c == 'z') + control->flags |= FLAG_ZPAQ_COMPRESS; + /* now FLAG_NOT_LZMA will evaluate as true */ + conf_file_compression_set = false; + break; + case '/': /* LZMA Compress selected */ + control->flags &= ~FLAG_NOT_LZMA; /* clear alternate compression flags */ break; case 'c': if (compat) { @@ -380,11 +410,6 @@ case 'f': control->flags |= FLAG_FORCE_REPLACE; break; - case 'g': - if (control->flags & FLAG_NOT_LZMA) - failure("Can only use one of -l, -b, -g, -z or -n\n"); - control->flags |= FLAG_ZLIB_COMPRESS; - break; case 'h': case '?': usage(compat); @@ -405,11 +430,6 @@ case 'K': control->flags |= FLAG_KEEP_BROKEN; break; - case 'l': - if (control->flags & FLAG_NOT_LZMA) - failure("Can only use one of -l, -b, -g, -z or -n\n"); - control->flags |= FLAG_LZO_COMPRESS; - break; case 'L': if (compat) { license(); @@ -422,15 +442,10 @@ case 'm': control->ramsize = atol(optarg) * 1024 * 1024 * 100; break; - case 'n': - if (control->flags & FLAG_NOT_LZMA) - failure("Can only use one of -l, -b, -g, -z or -n\n"); - control->flags |= FLAG_NO_COMPRESS; - break; case 'N': control->nice_val = atoi(optarg); - if (control->nice_val < -20 || control->nice_val > 19) - failure("Invalid nice value (must be -20..19)\n"); + if (control->nice_val < PRIO_MIN || control->nice_val > PRIO_MAX) + failure("Invalid nice value (must be %d...%d)\n", PRIO_MIN, PRIO_MAX); break; case 'o': if (control->outdir) @@ -508,11 +523,6 @@ if (control->window < 1) failure("Window must be positive\n"); break; - case 'z': - if (control->flags & FLAG_NOT_LZMA) - failure("Can only use one of -l, -b, -g, -z or -n\n"); - control->flags |= FLAG_ZPAQ_COMPRESS; - break; case '1': case '2': case '3': @@ -559,12 +569,20 @@ /* Set the main nice value to half that of the backend threads since * the rzip stage is usually the rate limiting step */ - if (control->nice_val > 0 && !NO_COMPRESS) { - if (unlikely(setpriority(PRIO_PROCESS, 0, control->nice_val / 2) == -1)) - print_err("Warning, unable to set nice value\n"); + control->current_priority = getpriority(PRIO_PROCESS, 0); + if (!NO_COMPRESS) { + /* If niceness can't be set. just reset process priority */ + if (unlikely(setpriority(PRIO_PROCESS, 0, control->nice_val/2) == -1)) { + print_err("Warning, unable to set nice value %d...Resetting to %d\n", + control->nice_val, control->current_priority); + setpriority(PRIO_PROCESS, 0, (control->nice_val=control->current_priority)); + } } else { - if (unlikely(setpriority(PRIO_PROCESS, 0, control->nice_val) == -1)) - print_err("Warning, unable to set nice value\n"); + if (unlikely(setpriority(PRIO_PROCESS, 0, control->nice_val) == -1)) { + print_err("Warning, unable to set nice value %d...Resetting to %d\n", + control->nice_val, control->current_priority); + setpriority(PRIO_PROCESS, 0, (control->nice_val=control->current_priority)); + } } /* One extra iteration for the case of no parameters means we will default to stdin/out */ diff -Nru lrzip-0.631+git180528/man/lrzip.conf.5 lrzip-0.631+git200516/man/lrzip.conf.5 --- lrzip-0.631+git180528/man/lrzip.conf.5 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/man/lrzip.conf.5 2020-05-16 07:56:08.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "lrzip.conf" "5" "January 2009" "" "" +.TH "lrzip.conf" "5" "January 2009, updated May 2019" "" "" .SH "NAME" lrzip.conf \- Configuration File for lrzip .SH "DESCRIPTION" @@ -13,54 +13,63 @@ .nf $PWD \- Current Directory /etc/lrzip -$HOME/\&./lrzip +$HOME/\&.lrzip .PP Parameters are set in \fBPARAMETER\&=VALUE\fP fashion where any line beginning with a \fB#\fP or that is blank will be ignored\&. -Parameter values are not case sensitive\&. +Parameter values are not case sensitive except where specified\&. .PP .SH "CONFIG FILE EXAMPLE" .nf # This is a comment. -# Compression Window size in 100MB. Normally selected by program. -# WINDOW = 5 -# Compression Level 1-9 (7 Default). +# Compression Window size in 100MB. Normally selected by program. (-w) +# WINDOW = 20 +# Compression Level 1-9 (7 Default). (-L) # COMPRESSIONLEVEL = 7 -# Unlimited Ram Compression -# UNLIMITED = YES -# Compression Method, rzip, gzip, bzip2, lzo, or lzma (default), zpaq. -# COMPRESSIONMETHOD = LZMA -# Perform LZO Test. Default = YES (\-T option, NO) +# Use -U setting, Unlimited ram. Yes or No +# UNLIMITED = NO +# Compression Method, rzip, gzip, bzip2, lzo, or lzma (default), or zpaq. (-n -g -b -l --lzma -z) +# If specified here, command line options not usable. +# COMPRESSIONMETHOD = lzma +# Perform LZO Test. Default = YES (-T ) # LZOTEST = NO -# Hash Check on decompression, YES +# Hash Check on decompression, (-c) # HASHCHECK = YES -# Show HASH value on Compression even if Verbose is off, YES +# Show HASH value on Compression even if Verbose is off, YES (-H) # SHOWHASH = YES -# Default output directory +# Default output directory (-O) # OUTPUTDIRECTORY = location -# Verbosity, Yes or Max -# VERBOSITY = MAX -# Show Progress as file is parsed, YES, NO (yes is default) -# SHOWPROGRESS = NO -# Set Niceness. 19 is default. \-20 to 19 is the allowable range +# Verbosity, YES or MAX (v, vv) +# VERBOSITY = max +# Show Progress as file is parsed, YES or no (NO = -q option) +# SHOWPROGRESS = YES + +# Set Niceness. 19 is default. -20 to 19 is the allowable range (-N) # NICE = 19 -# Keep broken or damaged output files, YES +# Keep broken or damaged output files, YES (-K) # KEEPBROKEN = YES -# Delete source file after compression + +# Delete source file after compression (-D) # this parameter and value are case sensitive # value must be YES to activate + # DELETEFILES = NO -# Replace existing lrzip file when compressing +# Replace existing lrzip file when compressing (-f) # this parameter and value are case sensitive # value must be YES to activate -# REPLACEFILE = NO -# Select Temporary Directory when stdin/stdout or Test file is used +# REPLACEFILE = YES + +# Override for Temporary Directory. Only valid when stdin/out or Test is used # TMPDIR = /tmp + +# Whether to use encryption on compression YES, NO (-e) +# ENCRYPT = NO + .fi .PP .SH "NOTES" diff -Nru lrzip-0.631+git180528/README.md lrzip-0.631+git200516/README.md --- lrzip-0.631+git180528/README.md 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/README.md 2020-05-16 07:56:08.000000000 +0000 @@ -15,7 +15,7 @@ #### Compression: ```bash -lrzdir=directory; tar cvf $lrzdir; lrzip -Ubvvp `nproc` -S .bzip2-lrz -L 9 $lrzdir.tar; rm -fv $lrzdir.tar; unset lrzdir +lrzdir=directory; tar cvf $lrzdir.tar $lrzdir; lrzip -Ubvvp `nproc` -S .bzip2-lrz -L 9 $lrzdir.tar; rm -fv $lrzdir.tar; unset lrzdir ``` `tar`s the directory, then maxes out all of the system's processor cores diff -Nru lrzip-0.631+git180528/stream.c lrzip-0.631+git200516/stream.c --- lrzip-0.631+git180528/stream.c 2018-05-29 14:36:49.000000000 +0000 +++ lrzip-0.631+git200516/stream.c 2020-05-16 07:56:08.000000000 +0000 @@ -325,7 +325,8 @@ lzma_level, 0, /* dict size. set default, choose by level */ -1, -1, -1, -1, /* lc, lp, pb, fb */ - control->threads); + control->threads > 1 ? 2: 1); + /* LZMA spec has threads = 1 or 2 only. */ if (lzma_ret != SZ_OK) { switch (lzma_ret) { case SZ_ERROR_MEM: @@ -1276,9 +1277,10 @@ cti = &cthread[i]; ctis = cti->sinfo; - if (unlikely(setpriority(PRIO_PROCESS, 0, control->nice_val) == -1)) - print_err("Warning, unable to set nice value on thread\n"); - + if (unlikely(setpriority(PRIO_PROCESS, 0, control->nice_val) == -1)) { + print_err("Warning, unable to set thread nice value %d...Resetting to %d\n", control->nice_val, control->current_priority); + setpriority(PRIO_PROCESS, 0, (control->nice_val=control->current_priority)); + } cti->c_type = CTYPE_NONE; cti->c_len = cti->s_len; @@ -1512,8 +1514,10 @@ dealloc(data); uci = &ucthread[i]; - if (unlikely(setpriority(PRIO_PROCESS, 0, control->nice_val) == -1)) - print_err("Warning, unable to set nice value on thread\n"); + if (unlikely(setpriority(PRIO_PROCESS, 0, control->nice_val) == -1)) { + print_err("Warning, unable to set thread nice value %d...Resetting to %d\n", control->nice_val, control->current_priority); + setpriority(PRIO_PROCESS, 0, (control->nice_val=control->current_priority)); + } retry: if (uci->c_type != CTYPE_NONE) { @@ -1543,7 +1547,7 @@ * parallel */ if (unlikely(ret)) { if (unlikely(waited)) - failure_return(("Failed to decompress in ucompthread\n"), NULL); + failure_return(("Failed to decompress in ucompthread\n"), (void*)1); print_maxverbose("Unable to decompress in parallel, waiting for previous thread to complete before trying again\n"); /* We do not strictly need to wait for this, so it's used when * decompression fails due to inadequate memory to try again @@ -1567,14 +1571,13 @@ i64 u_len, c_len, last_head, padded_len, header_length, max_len; uchar enc_head[25 + SALT_LEN], blocksalt[SALT_LEN]; stream_thread_struct *st; - bool new_thread = false; uchar c_type, *s_buf; + void *thr_return; dealloc(s->buf); if (s->eos) goto out; fill_another: - new_thread = true; if (unlikely(ucthread[s->uthread_no].busy)) failure_return(("Trying to start a busy thread, this shouldn't happen!\n"), -1); @@ -1632,24 +1635,32 @@ c_len = le64toh(c_len); u_len = le64toh(u_len); last_head = le64toh(last_head); + print_maxverbose("Fill_buffer stream %d c_len %lld u_len %lld last_head %lld\n", streamno, c_len, u_len, last_head); + + /* It is possible for there to be an empty match block at the end of + * incompressible data */ + if (unlikely(c_len == 0 && u_len == 0 && streamno == 1 && last_head == 0)) { + print_maxverbose("Skipping empty match block\n"); + goto skip_empty; + } + /* Check for invalid data and that the last_head is actually moving * forward correctly. */ if (unlikely(c_len < 1 || u_len < 1 || last_head < 0 || (last_head && last_head <= s->last_head))) { fatal_return(("Invalid data compressed len %lld uncompressed %lld last_head %lld\n", c_len, u_len, last_head), -1); } - print_maxverbose("Fill_buffer stream %d c_len %lld u_len %lld last_head %lld\n", streamno, c_len, u_len, last_head); padded_len = MAX(c_len, MIN_SIZE); sinfo->total_read += padded_len; fsync(control->fd_out); if (unlikely(u_len > control->maxram)) - fatal_return(("Unable to malloc buffer of size %lld in this environment\n", u_len), -1); + print_progress("Warning, attempting to malloc very large buffer for this environment of size %lld\n", u_len); max_len = MAX(u_len, MIN_SIZE); max_len = MAX(max_len, c_len); s_buf = malloc(max_len); - if (unlikely(u_len && !s_buf)) + if (unlikely(!s_buf)) fatal_return(("Unable to malloc buffer of size %lld in fill_buffer\n", u_len), -1); sinfo->ram_alloced += u_len; @@ -1687,7 +1698,7 @@ if (++s->uthread_no == s->base_thread + s->total_threads) s->uthread_no = s->base_thread; - +skip_empty: /* Reached the end of this stream, no more data to read in, otherwise * see if the next thread is free to grab more data. We also check that * we're not going to be allocating too much ram to generate all these @@ -1704,7 +1715,8 @@ unlock_mutex(control, &output_lock); /* join_pthread here will make it wait till the data is ready */ - if (unlikely(new_thread && !join_pthread(control, threads[s->unext_thread], NULL))) + thr_return = NULL; + if (unlikely(!join_pthread(control, threads[s->unext_thread], &thr_return) || !!thr_return)) return -1; ucthread[s->unext_thread].busy = 0; diff -Nru lrzip-0.631+git180528/TODO lrzip-0.631+git200516/TODO --- lrzip-0.631+git180528/TODO 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/TODO 2020-05-16 07:56:08.000000000 +0000 @@ -21,5 +21,3 @@ Consider using LZMA Filters for processor-optimised coding to increase compression. - -Get the ASM working on 64bit - it's only the CRC check so probably no point. diff -Nru lrzip-0.631+git180528/util.c lrzip-0.631+git200516/util.c --- lrzip-0.631+git180528/util.c 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/util.c 2020-05-16 07:56:08.000000000 +0000 @@ -117,7 +117,9 @@ i64 dictsize = (level <= 5 ? (1 << (level * 2 + 14)) : (level == 6 ? (1 << 25) : (1 << 26))); - control->overhead = (dictsize * 23 / 2) + (4 * 1024 * 1024); + control->overhead = (dictsize * 23 / 2) + (6 * 1024 * 1024) + 16384; + /* LZMA spec shows memory requirements as 6MB, not 4MB and state size + * where default is 16KB */ } else if (ZPAQ_COMPRESS) control->overhead = 112 * 1024 * 1024; } @@ -205,7 +207,7 @@ fprintf(control->msgout, "Using configuration file /etc/lrzip/lrzip.conf\n"); } if (fp == NULL) - return true; + return false; /* if we get here, we have a file. read until no more. */ diff -Nru lrzip-0.631+git180528/WHATS-NEW lrzip-0.631+git200516/WHATS-NEW --- lrzip-0.631+git180528/WHATS-NEW 2018-05-17 15:35:13.000000000 +0000 +++ lrzip-0.631+git200516/WHATS-NEW 2020-05-16 07:56:08.000000000 +0000 @@ -1,3 +1,7 @@ +lrzip-0.631 + +Assembler code is back and works with x86_64 + lrzip-0.621 Substantial speed ups for the rzip stage in both regular and unlimited modes.