1
0
Fork 0

Adding upstream version 1.6.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-23 19:21:02 +01:00
parent 073a55afd4
commit f87096b5dd
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
7 changed files with 18 additions and 14 deletions

View file

@ -1,6 +1,6 @@
2015-04-09 Antonio Diaz Diaz <antonio@gnu.org> 2015-05-26 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.6-rc1 released. * Version 1.6 released.
* main.c (close_and_set_permissions): Behave like 'cp -p'. * main.c (close_and_set_permissions): Behave like 'cp -p'.
* Makefile.in: Added new targets 'install*-compress'. * Makefile.in: Added new targets 'install*-compress'.
@ -19,7 +19,7 @@
* main.c: Added new option '-o, --output'. * main.c: Added new option '-o, --output'.
* main.c: Accept more than one file in command line. * main.c: Accept more than one file in command line.
* Decompression time has been reduced by 5%. * Decompression time has been reduced by 5%.
* main.c: '--test' no more needs '/dev/null'. * main.c: '--test' no longer needs '/dev/null'.
* Fixed return value of '-d' and '-t' in case of data error. * Fixed return value of '-d' and '-t' in case of data error.
* main.c: Changed info shown at verbosity levels 2 and 3. * main.c: Changed info shown at verbosity levels 2 and 3.
* Ignore option '-n, --threads' for compatibility with plzip. * Ignore option '-n, --threads' for compatibility with plzip.

View file

@ -1,7 +1,7 @@
Requirements Requirements
------------ ------------
You will need a C compiler. You will need a C compiler.
I use gcc 4.9.1 and 3.3.6, but the code should compile with any I use gcc 4.9.1 and 4.1.2, but the code should compile with any
standards compliant compiler. standards compliant compiler.
Gcc is available at http://gcc.gnu.org. Gcc is available at http://gcc.gnu.org.

View file

@ -18,13 +18,13 @@ objs = carg_parser.o LzFind.o LzmaEnc.o LzmaDec.o main.o
all : $(progname) all : $(progname)
$(progname) : $(objs) $(progname) : $(objs)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs) $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(objs)
main.o : main.c main.o : main.c
$(CC) $(CFLAGS) $(CPPFLAGS) -DPROGVERSION=\"$(pkgversion)\" -c -o $@ $< $(CC) $(CPPFLAGS) $(CFLAGS) -DPROGVERSION=\"$(pkgversion)\" -c -o $@ $<
%.o : %.c %.o : %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
$(objs) : Makefile $(objs) : Makefile
carg_parser.o : carg_parser.h carg_parser.o : carg_parser.h

2
configure vendored
View file

@ -6,7 +6,7 @@
# to copy, distribute and modify it. # to copy, distribute and modify it.
pkgname=pdlzip pkgname=pdlzip
pkgversion=1.6-rc1 pkgversion=1.6
progname=pdlzip progname=pdlzip
srctrigger=doc/${progname}.1 srctrigger=doc/${progname}.1

View file

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.1. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.1.
.TH PDLZIP "1" "April 2015" "pdlzip 1.6-rc1" "User Commands" .TH PDLZIP "1" "May 2015" "pdlzip 1.6" "User Commands"
.SH NAME .SH NAME
pdlzip \- reduces the size of files pdlzip \- reduces the size of files
.SH SYNOPSIS .SH SYNOPSIS
@ -8,6 +8,8 @@ pdlzip \- reduces the size of files
.SH DESCRIPTION .SH DESCRIPTION
Pdlzip \- A "public domain" version of the lzip data compressor Pdlzip \- A "public domain" version of the lzip data compressor
also able to decompress legacy lzma\-alone (.lzma) files. also able to decompress legacy lzma\-alone (.lzma) files.
Lzma\-alone is a very bad format. If you keep any lzma\-alone files, it is
advisable to recompress them to lzip format.
.SH OPTIONS .SH OPTIONS
.TP .TP
\fB\-h\fR, \fB\-\-help\fR \fB\-h\fR, \fB\-\-help\fR
@ -26,7 +28,7 @@ decompress
overwrite existing output files overwrite existing output files
.TP .TP
\fB\-F\fR, \fB\-\-recompress\fR \fB\-F\fR, \fB\-\-recompress\fR
force recompression of compressed files force re\-compression of compressed files
.TP .TP
\fB\-k\fR, \fB\-\-keep\fR \fB\-k\fR, \fB\-\-keep\fR
keep (don't delete) input files keep (don't delete) input files

4
lzip.h
View file

@ -164,10 +164,10 @@ static inline bool Fh_set_dictionary_size( File_header data, const unsigned sz )
if( sz > min_dictionary_size ) if( sz > min_dictionary_size )
{ {
const unsigned base_size = 1 << data[5]; const unsigned base_size = 1 << data[5];
const unsigned wedge = base_size / 16; const unsigned fraction = base_size / 16;
int i; int i;
for( i = 7; i >= 1; --i ) for( i = 7; i >= 1; --i )
if( base_size - ( i * wedge ) >= sz ) if( base_size - ( i * fraction ) >= sz )
{ data[5] |= ( i << 5 ); break; } { data[5] |= ( i << 5 ); break; }
} }
return true; return true;

6
main.c
View file

@ -98,6 +98,8 @@ static void show_help( void )
{ {
printf( "%s - A \"public domain\" version of the lzip data compressor\n", Program_name ); printf( "%s - A \"public domain\" version of the lzip data compressor\n", Program_name );
printf( "also able to decompress legacy lzma-alone (.lzma) files.\n" printf( "also able to decompress legacy lzma-alone (.lzma) files.\n"
"Lzma-alone is a very bad format. If you keep any lzma-alone files, it is\n"
"advisable to recompress them to lzip format.\n"
"\nUsage: %s [options] [files]\n", invocation_name ); "\nUsage: %s [options] [files]\n", invocation_name );
printf( "\nOptions:\n" printf( "\nOptions:\n"
" -h, --help display this help and exit\n" " -h, --help display this help and exit\n"
@ -105,7 +107,7 @@ static void show_help( void )
" -c, --stdout send output to standard output\n" " -c, --stdout send output to standard output\n"
" -d, --decompress decompress\n" " -d, --decompress decompress\n"
" -f, --force overwrite existing output files\n" " -f, --force overwrite existing output files\n"
" -F, --recompress force recompression of compressed files\n" " -F, --recompress force re-compression of compressed files\n"
" -k, --keep keep (don't delete) input files\n" " -k, --keep keep (don't delete) input files\n"
" -m, --match-length=<bytes> set match length limit in bytes [36]\n" " -m, --match-length=<bytes> set match length limit in bytes [36]\n"
" -o, --output=<file> if reading stdin, place the output into <file>\n" " -o, --output=<file> if reading stdin, place the output into <file>\n"
@ -221,7 +223,7 @@ static unsigned long getnum( const char * const ptr,
static int get_dict_size( const char * const arg ) static int get_dict_size( const char * const arg )
{ {
char * tail; char * tail;
int bits = strtol( arg, &tail, 0 ); const int bits = strtol( arg, &tail, 0 );
if( bits >= min_dictionary_bits && if( bits >= min_dictionary_bits &&
bits <= max_dictionary_bits && *tail == 0 ) bits <= max_dictionary_bits && *tail == 0 )
return ( 1 << bits ); return ( 1 << bits );