Adding upstream version 1.15.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
ce2c936d6b
commit
8906af078d
15 changed files with 47 additions and 45 deletions
|
@ -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.
|
||||
|
|
5
INSTALL
5
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.
|
||||
|
|
18
README
18
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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
6
configure
vendored
6
configure
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
13
decoder.h
13
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 );
|
||||
|
|
|
@ -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.
|
||||
|
|
4
list.c
4
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;
|
||||
}
|
||||
|
|
6
lzip.h
6
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 );
|
||||
|
|
|
@ -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)." );
|
||||
|
|
|
@ -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
|
||||
|
|
10
main.c
10
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; ; )
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue