summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2025-01-14 10:10:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2025-01-14 10:10:26 +0000
commit578c16eb4eff0b66d143d53d151b434c1108dcc7 (patch)
tree09cfe63619cc83a8ef98098edbad93ccfb478a9c
parentReleasing debian version 1.15~rc1-1. (diff)
downloadlunzip-578c16eb4eff0b66d143d53d151b434c1108dcc7.tar.xz
lunzip-578c16eb4eff0b66d143d53d151b434c1108dcc7.zip
Merging upstream version 1.15.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--ChangeLog6
-rw-r--r--INSTALL5
-rw-r--r--README18
-rw-r--r--carg_parser.c2
-rw-r--r--carg_parser.h2
-rwxr-xr-xconfigure6
-rw-r--r--decoder.c6
-rw-r--r--decoder.h13
-rw-r--r--doc/lunzip.16
-rw-r--r--list.c4
-rw-r--r--lzip.h6
-rw-r--r--lzip_index.c4
-rw-r--r--lzip_index.h2
-rw-r--r--main.c10
-rwxr-xr-xtestsuite/check.sh2
15 files changed, 47 insertions, 45 deletions
diff --git a/ChangeLog b/ChangeLog
index 6782d3f..cf5e714 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
-2024-11-17 Antonio Diaz Diaz <antonio@gnu.org>
+2025-01-07 Antonio Diaz Diaz <antonio@gnu.org>
- * Version 1.15-rc1 released.
+ * Version 1.15 released.
* Remove options '--empty-error' and '--marking-error'.
* main.c (Pp_free): New function.
* decoder.c (LZd_decode_member): Remove support for Sync Flush marker.
@@ -142,7 +142,7 @@
* Created from the decompression code of clzip 1.1.
-Copyright (C) 2010-2024 Antonio Diaz Diaz.
+Copyright (C) 2010-2025 Antonio Diaz Diaz.
This file is a collection of facts, and thus it is not copyrightable, but just
in case, you have unlimited permission to copy, distribute, and modify it.
diff --git a/INSTALL b/INSTALL
index 9fe40ef..ba261b4 100644
--- a/INSTALL
+++ b/INSTALL
@@ -3,7 +3,8 @@ Requirements
You will need a C99 compiler. (gcc 3.3.6 or newer is recommended).
I use gcc 6.1.0 and 3.3.6, but the code should compile with any standards
compliant compiler.
-Gcc is available at http://gcc.gnu.org.
+Gcc is available at http://gcc.gnu.org
+Lzip is available at http://www.nongnu.org/lzip/lzip.html
The operating system must allow signal handlers read access to objects with
static storage duration so that the cleanup handler for Control-C can delete
@@ -74,7 +75,7 @@ After running 'configure', you can run 'make' and 'make install' as
explained above.
-Copyright (C) 2010-2024 Antonio Diaz Diaz.
+Copyright (C) 2010-2025 Antonio Diaz Diaz.
This file is free documentation: you have unlimited permission to copy,
distribute, and modify it.
diff --git a/README b/README
index 36784cd..7a77db5 100644
--- a/README
+++ b/README
@@ -1,3 +1,5 @@
+See the file INSTALL for compilation and installation instructions.
+
Description
Lunzip is a decompressor for the lzip format written in C. Its small size
@@ -19,11 +21,10 @@ compressed format for Unix-like systems.
The lzip file format is designed for data sharing and long-term archiving,
taking into account both data integrity and decoder availability:
- * The lzip format provides very safe integrity checking and some data
- recovery means. The program lziprecover can repair bit flip errors
- (one of the most common forms of data corruption) in lzip files, and
- provides data recovery capabilities, including error-checked merging
- of damaged copies of a file.
+ * The program lziprecover can repair bit flip errors (one of the most
+ common forms of data corruption) in lzip files, and provides data
+ recovery capabilities, including error-checked merging of damaged
+ copies of a file.
* The lzip format is as simple as possible (but not simpler). The lzip
manual provides the source code of a simple decompressor along with a
@@ -50,7 +51,7 @@ compress the file. To activate it, specify the size of the output buffer
with the option '--buffer-size' and lunzip will use the decompressed
file as dictionary for distances beyond the buffer size. Of course, the
larger the difference between the buffer size and the dictionary size, the
-more accesses to disk are needed and the slower the decompression is.
+more accesses to disc are needed and the slower the decompression is.
This 'low memory' mode only works when decompressing to a regular file
and is intended for systems without enough memory (RAM + swap) to keep
the whole dictionary at once. It has been tested on a laptop with a 486
@@ -99,8 +100,11 @@ LANGUAGE NOTE: Uncompressed = not compressed = plain data; it may never have
been compressed. Decompressed is used to refer to data which have undergone
the process of decompression.
+Lunzip uses Arg_parser for command-line argument parsing:
+http://www.nongnu.org/arg-parser/arg_parser.html
+
-Copyright (C) 2010-2024 Antonio Diaz Diaz.
+Copyright (C) 2010-2025 Antonio Diaz Diaz.
This file is free documentation: you have unlimited permission to copy,
distribute, and modify it.
diff --git a/carg_parser.c b/carg_parser.c
index 9400342..20b8a16 100644
--- a/carg_parser.c
+++ b/carg_parser.c
@@ -1,5 +1,5 @@
/* Arg_parser - POSIX/GNU command-line argument parser. (C version)
- Copyright (C) 2006-2024 Antonio Diaz Diaz.
+ Copyright (C) 2006-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided
diff --git a/carg_parser.h b/carg_parser.h
index 294756c..28eabee 100644
--- a/carg_parser.h
+++ b/carg_parser.h
@@ -1,5 +1,5 @@
/* Arg_parser - POSIX/GNU command-line argument parser. (C version)
- Copyright (C) 2006-2024 Antonio Diaz Diaz.
+ Copyright (C) 2006-2025 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided
diff --git a/configure b/configure
index 4aea9d0..9a8aff2 100755
--- a/configure
+++ b/configure
@@ -1,12 +1,12 @@
#! /bin/sh
# configure script for Lunzip - Decompressor for the lzip format
-# Copyright (C) 2010-2024 Antonio Diaz Diaz.
+# Copyright (C) 2010-2025 Antonio Diaz Diaz.
#
# This configure script is free software: you have unlimited permission
# to copy, distribute, and modify it.
pkgname=lunzip
-pkgversion=1.15-rc1
+pkgversion=1.15
progname=lunzip
srctrigger=doc/${progname}.1
@@ -171,7 +171,7 @@ echo "MAKEINFO = ${MAKEINFO}"
rm -f Makefile
cat > Makefile << EOF
# Makefile for Lunzip - Decompressor for the lzip format
-# Copyright (C) 2010-2024 Antonio Diaz Diaz.
+# Copyright (C) 2010-2025 Antonio Diaz Diaz.
# This file was generated automatically by configure. Don't edit.
#
# This Makefile is free software: you have unlimited permission
diff --git a/decoder.c b/decoder.c
index fbd185e..7765e76 100644
--- a/decoder.c
+++ b/decoder.c
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2024 Antonio Diaz Diaz.
+ Copyright (C) 2010-2025 Antonio Diaz Diaz.
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
@@ -102,7 +102,7 @@ void LZd_flush_data( LZ_decoder * const d )
CRC32_update_buf( &d->crc, d->buffer + d->stream_pos, size );
if( d->outfd >= 0 &&
writeblock( d->outfd, d->buffer + d->stream_pos, size ) != size )
- { show_error( write_error_msg, errno, false ); cleanup_and_fail( 1 ); }
+ { show_error( wr_err_msg, errno, false ); cleanup_and_fail( 1 ); }
if( d->pos >= d->buffer_size )
{ d->partial_data_pos += d->pos; d->pos = 0;
if( d->partial_data_pos >= d->dictionary_size ) d->pos_wrapped = true; }
@@ -234,7 +234,7 @@ int LZd_decode_member( LZ_decoder * const d, Pretty_print * const pp )
if( Rd_decode_bit( rdec, &bm_rep0[state] ) == 0 ) /* 3rd bit */
{
if( Rd_decode_bit( rdec, &bm_len[state][pos_state] ) == 0 ) /* 4th bit */
- { state = St_set_short_rep( state );
+ { state = St_set_shortrep( state );
LZd_put_byte( d, LZd_peek( d, rep0 ) ); continue; }
}
else
diff --git a/decoder.h b/decoder.h
index 853c04d..fe43e0a 100644
--- a/decoder.h
+++ b/decoder.h
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2024 Antonio Diaz Diaz.
+ Copyright (C) 2010-2025 Antonio Diaz Diaz.
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
@@ -204,9 +204,8 @@ static inline unsigned Rd_decode_tree8( Range_decoder * const rdec,
return symbol & 0xFF;
}
-static inline unsigned
-Rd_decode_tree_reversed( Range_decoder * const rdec,
- Bit_model bm[], const int num_bits )
+static inline unsigned Rd_decode_tree_reversed( Range_decoder * const rdec,
+ Bit_model bm[], const int num_bits )
{
unsigned model = 1;
unsigned symbol = 0;
@@ -244,8 +243,7 @@ static inline unsigned Rd_decode_matched( Range_decoder * const rdec,
}
static inline unsigned Rd_decode_len( Range_decoder * const rdec,
- Len_model * const lm,
- const int pos_state )
+ Len_model * const lm, const int pos_state )
{
Bit_model * bm;
unsigned mask, offset, symbol = 1;
@@ -386,8 +384,7 @@ static inline void LZd_free( LZ_decoder * const d )
static inline unsigned LZd_crc( const LZ_decoder * const d )
{ return d->crc ^ 0xFFFFFFFFU; }
-static inline unsigned long long
-LZd_data_position( const LZ_decoder * const d )
+static inline unsigned long long LZd_data_position( const LZ_decoder * const d )
{ return d->partial_data_pos + d->pos; }
int LZd_decode_member( LZ_decoder * const d, Pretty_print * const pp );
diff --git a/doc/lunzip.1 b/doc/lunzip.1
index 54c098e..be23de8 100644
--- a/doc/lunzip.1
+++ b/doc/lunzip.1
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
-.TH LUNZIP "1" "November 2024" "lunzip 1.15-rc1" "User Commands"
+.TH LUNZIP "1" "January 2025" "lunzip 1.15" "User Commands"
.SH NAME
lunzip \- decompressor for the lzip format
.SH SYNOPSIS
@@ -28,7 +28,7 @@ compress the file. To activate it, specify the size of the output buffer
with the option \fB\-\-buffer\-size\fR and lunzip will use the decompressed
file as dictionary for distances beyond the buffer size. Of course, the
larger the difference between the buffer size and the dictionary size, the
-more accesses to disk are needed and the slower the decompression is.
+more accesses to disc are needed and the slower the decompression is.
This 'low memory' mode only works when decompressing to a regular file
and is intended for systems without enough memory (RAM + swap) to keep
the whole dictionary at once.
@@ -101,7 +101,7 @@ Report bugs to lzip\-bug@nongnu.org
.br
Lunzip home page: http://www.nongnu.org/lzip/lunzip.html
.SH COPYRIGHT
-Copyright \(co 2024 Antonio Diaz Diaz.
+Copyright \(co 2025 Antonio Diaz Diaz.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
.br
This is free software: you are free to change and redistribute it.
diff --git a/list.c b/list.c
index 7ed74ff..503d4c5 100644
--- a/list.c
+++ b/list.c
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2024 Antonio Diaz Diaz.
+ Copyright (C) 2010-2025 Antonio Diaz Diaz.
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
@@ -115,7 +115,7 @@ int list_files( const char * const filenames[], const int num_filenames,
fflush( stdout );
}
if( verbosity >= 0 && ( ferror( stdout ) || fclose( stdout ) != 0 ) )
- { show_file_error( "(stdout)", write_error_msg, errno );
+ { show_file_error( "(stdout)", wr_err_msg, errno );
set_retval( &retval, 1 ); }
return retval;
}
diff --git a/lzip.h b/lzip.h
index 8f793a8..4f9a366 100644
--- a/lzip.h
+++ b/lzip.h
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2024 Antonio Diaz Diaz.
+ Copyright (C) 2010-2025 Antonio Diaz Diaz.
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
@@ -36,7 +36,7 @@ static inline State St_set_match( const State st )
{ return ( st < 7 ) ? 7 : 10; }
static inline State St_set_rep( const State st )
{ return ( st < 7 ) ? 8 : 11; }
-static inline State St_set_short_rep( const State st )
+static inline State St_set_shortrep( const State st )
{ return ( st < 7 ) ? 9 : 11; }
@@ -256,7 +256,7 @@ static const char * const empty_msg = "Empty member not allowed.";
static const char * const mem_msg = "Not enough memory.";
static const char * const nonzero_msg = "Nonzero first LZMA byte.";
static const char * const trailing_msg = "Trailing data not allowed.";
-static const char * const write_error_msg = "Write error";
+static const char * const wr_err_msg = "Write error";
/* defined in decoder.c */
int readblock( const int fd, uint8_t * const buf, const int size );
diff --git a/lzip_index.c b/lzip_index.c
index 91a9ec6..ab58355 100644
--- a/lzip_index.c
+++ b/lzip_index.c
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2024 Antonio Diaz Diaz.
+ Copyright (C) 2010-2025 Antonio Diaz Diaz.
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
@@ -208,7 +208,7 @@ bool Li_init( Lzip_index * const li, const int infd,
( !Li_read_header( li, infd, header, 0 ) ||
!Li_check_header( li, header ) ) ) return false;
if( li->insize < min_member_size )
- { add_error( li, "Input file is too short." ); li->retval = 2;
+ { add_error( li, "Input file is truncated." ); li->retval = 2;
return false; }
if( li->insize > INT64_MAX )
{ add_error( li, "Input file is too long (2^63 bytes or more)." );
diff --git a/lzip_index.h b/lzip_index.h
index 3fb4f35..0b446dc 100644
--- a/lzip_index.h
+++ b/lzip_index.h
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2024 Antonio Diaz Diaz.
+ Copyright (C) 2010-2025 Antonio Diaz Diaz.
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
diff --git a/main.c b/main.c
index f46af3b..0fc8107 100644
--- a/main.c
+++ b/main.c
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2024 Antonio Diaz Diaz.
+ Copyright (C) 2010-2025 Antonio Diaz Diaz.
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
@@ -78,7 +78,7 @@
int verbosity = 0;
static const char * const program_name = "lunzip";
-static const char * const program_year = "2024";
+static const char * const program_year = "2025";
static const char * invocation_name = "lunzip"; /* default value */
static const struct { const char * from; const char * to; } known_extensions[] = {
@@ -117,7 +117,7 @@ static void show_help( void )
"with the option --buffer-size and lunzip will use the decompressed\n"
"file as dictionary for distances beyond the buffer size. Of course, the\n"
"larger the difference between the buffer size and the dictionary size, the\n"
- "more accesses to disk are needed and the slower the decompression is.\n"
+ "more accesses to disc are needed and the slower the decompression is.\n"
"This 'low memory' mode only works when decompressing to a regular file\n"
"and is intended for systems without enough memory (RAM + swap) to keep\n"
"the whole dictionary at once.\n"
@@ -279,7 +279,7 @@ void show_header( const unsigned dictionary_size )
}
-/* separate numbers of 6 or more digits in groups of 3 digits using '_' */
+/* separate numbers of 5 or more digits in groups of 3 digits using '_' */
static const char * format_num3( unsigned long long num )
{
enum { buffers = 8, bufsize = 4 * sizeof num, n = 10 };
@@ -302,7 +302,7 @@ static const char * format_num3( unsigned long long num )
{ num /= 1000; prefix = si_prefix[i]; }
if( prefix ) *(--p) = prefix;
}
- const bool split = num >= 100000;
+ const bool split = num >= 10000;
for( i = 0; ; )
{
diff --git a/testsuite/check.sh b/testsuite/check.sh
index 296e165..2396efb 100755
--- a/testsuite/check.sh
+++ b/testsuite/check.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# check script for Lunzip - Decompressor for the lzip format
-# Copyright (C) 2010-2024 Antonio Diaz Diaz.
+# Copyright (C) 2010-2025 Antonio Diaz Diaz.
#
# This script is free software: you have unlimited permission
# to copy, distribute, and modify it.