diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-06 11:28:53 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-06 11:28:53 +0000 |
commit | a3629922528ef8b10b664add82a8d5a1d26712b1 (patch) | |
tree | f7a142116cac25055205729fbf1c17f76066b351 | |
parent | Adding upstream version 1.0~rc3. (diff) | |
download | clzip-a3629922528ef8b10b664add82a8d5a1d26712b1.tar.xz clzip-a3629922528ef8b10b664add82a8d5a1d26712b1.zip |
Adding upstream version 1.0.upstream/1.0
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | README | 5 | ||||
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | decoder.c | 11 | ||||
-rw-r--r-- | decoder.h | 6 | ||||
-rw-r--r-- | doc/clzip.1 | 5 | ||||
-rw-r--r-- | doc/clzip.info | 21 | ||||
-rw-r--r-- | doc/clzip.texinfo | 9 | ||||
-rw-r--r-- | main.c | 7 |
10 files changed, 48 insertions, 39 deletions
@@ -1,19 +1,8 @@ -2010-03-13 Antonio Diaz Diaz <ant_diaz@teleline.es> +2010-04-05 Antonio Diaz Diaz <ant_diaz@teleline.es> - * Version 1.0-rc3 released. - * decoder.h: Input_buffer integrated in Range_decoder. - -2010-02-21 Antonio Diaz Diaz <ant_diaz@teleline.es> - - * Version 1.0-rc2 released. - * Code cleanup. - * clzip.h: Fixed warnings produced by over-optimization (-O3). - -2010-02-14 Antonio Diaz Diaz <ant_diaz@teleline.es> - - * Version 1.0-rc1 released. + * Version 1.0 released. * Initial release. - * Translated to C from the C++ source for lzip 1.10-rc1. + * Translated to C from the C++ source for lzip 1.10. Copyright (C) 2010 Antonio Diaz Diaz. @@ -2,4 +2,4 @@ Changes in version 1.0: Initial release. -Translated to C from the C++ source for lzip 1.10-rc3. +Translated to C from the C++ source for lzip 1.10. @@ -6,6 +6,11 @@ gzip or bzip2. Clzip decompresses almost as fast as gzip and compresses better than bzip2, which makes it well suited for software distribution and data archiving. +Clzip uses the lzip file format; the files produced by clzip are fully +compatible with lzip-1.4 or newer. Clzip is in fact a C language version +of lzip, intended for embedded devices or systems lacking a C++ +compiler. + Clzip replaces every file given in the command line with a compressed version of itself, with the name "original_name.lz". Each compressed file has the same modification date, permissions, and, when possible, @@ -5,12 +5,12 @@ # This configure script is free software: you have unlimited permission # to copy, distribute and modify it. # -# Date of this version: 2010-03-13 +# Date of this version: 2010-04-05 args= no_create= pkgname=clzip -pkgversion=1.0-rc3 +pkgversion=1.0 progname=clzip srctrigger=clzip.h @@ -63,7 +63,7 @@ bool LZd_verify_trailer( struct LZ_decoder * const decoder, struct Pretty_print * const pp ) { File_trailer trailer; - const int trailer_size = Ft_versioned_size( decoder->format_version ); + const int trailer_size = Ft_versioned_size( decoder->member_version ); const long long member_size = LZd_member_position( decoder ) + trailer_size; bool error = false; @@ -83,7 +83,7 @@ bool LZd_verify_trailer( struct LZ_decoder * const decoder, for( ; i < trailer_size; ++i ) trailer[i] = 0; } } - if( decoder->format_version == 0 ) Ft_set_member_size( trailer, member_size ); + if( decoder->member_version == 0 ) Ft_set_member_size( trailer, member_size ); if( !Rd_code_is_zero( decoder->range_decoder ) ) { error = true; @@ -153,10 +153,11 @@ int LZd_decode_member( struct LZ_decoder * const decoder, { const uint8_t prev_byte = LZd_get_byte( decoder, 0 ); if( St_is_char( state ) ) - LZd_put_byte( decoder, Lid_decode( &decoder->literal_decoder, decoder->range_decoder, prev_byte ) ); + LZd_put_byte( decoder, Lid_decode( &decoder->literal_decoder, + decoder->range_decoder, prev_byte ) ); else - LZd_put_byte( decoder, Lid_decode_matched( &decoder->literal_decoder, decoder->range_decoder, prev_byte, - LZd_get_byte( decoder, rep0 ) ) ); + LZd_put_byte( decoder, Lid_decode_matched( &decoder->literal_decoder, + decoder->range_decoder, prev_byte, LZd_get_byte( decoder, rep0 ) ) ); St_set_char( &state ); } else @@ -43,7 +43,7 @@ static inline void Rd_init( struct Range_decoder * const rdec, const int infd ) rdec->pos = 0; rdec->stream_pos = 0; rdec->code = 0; - rdec->range = 0xFFFFFFFF; + rdec->range = 0xFFFFFFFFU; rdec->infd_ = infd; rdec->at_stream_end = false; } @@ -242,7 +242,7 @@ static inline uint8_t Lid_decode_matched( struct Literal_decoder * const literal struct LZ_decoder { long long partial_data_pos; - int format_version; + int member_version; int dictionary_size; int buffer_size; uint8_t * buffer; @@ -313,7 +313,7 @@ static inline void LZd_init( struct LZ_decoder * const decoder, struct Range_decoder * const rdec, const int outfd ) { decoder->partial_data_pos = 0; - decoder->format_version = Fh_version( header ); + decoder->member_version = Fh_version( header ); decoder->dictionary_size = Fh_get_dictionary_size( header ); decoder->buffer_size = max( 65536, decoder->dictionary_size ); decoder->buffer = (uint8_t *)malloc( decoder->buffer_size ); diff --git a/doc/clzip.1 b/doc/clzip.1 index f259dfa..25c509e 100644 --- a/doc/clzip.1 +++ b/doc/clzip.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. -.TH CLZIP "1" "March 2010" "Clzip 1.0-rc3" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. +.TH CLZIP "1" "April 2010" "Clzip 1.0" "User Commands" .SH NAME Clzip \- data compressor based on the LZMA algorithm .SH SYNOPSIS @@ -66,6 +66,7 @@ Numbers may be followed by a multiplier: k = kB = 10^3 = 1000, Ki = KiB = 2^10 = 1024, M = 10^6, Mi = 2^20, G = 10^9, Gi = 2^30, etc... .SH "REPORTING BUGS" Report bugs to lzip\-bug@nongnu.org +.br Clzip home page: http://www.nongnu.org/lzip/clzip.html .SH COPYRIGHT Copyright \(co 2010 Antonio Diaz Diaz. diff --git a/doc/clzip.info b/doc/clzip.info index a98e8e5..2bab8b6 100644 --- a/doc/clzip.info +++ b/doc/clzip.info @@ -12,7 +12,7 @@ File: clzip.info, Node: Top, Next: Introduction, Up: (dir) Clzip Manual ************ -This manual is for Clzip (version 1.0-rc3, 13 March 2010). +This manual is for Clzip (version 1.0, 5 April 2010). * Menu: @@ -42,6 +42,11 @@ gzip or bzip2. Clzip decompresses almost as fast as gzip and compresses better than bzip2, which makes it well suited for software distribution and data archiving. + Clzip uses the lzip file format; the files produced by clzip are +fully compatible with lzip-1.4 or newer. Clzip is in fact a C language +version of lzip, intended for embedded devices or systems lacking a C++ +compiler. + Clzip replaces every file given in the command line with a compressed version of itself, with the name "original_name.lz". Each compressed file has the same modification date, permissions, and, when possible, @@ -432,12 +437,12 @@ Concept Index Tag Table: Node: Top226 -Node: Introduction835 -Node: Algorithm4160 -Node: Invoking Clzip6391 -Node: File Format10747 -Node: Examples12703 -Node: Problems13880 -Node: Concept Index14406 +Node: Introduction830 +Node: Algorithm4377 +Node: Invoking Clzip6608 +Node: File Format10964 +Node: Examples12920 +Node: Problems14097 +Node: Concept Index14623 End Tag Table diff --git a/doc/clzip.texinfo b/doc/clzip.texinfo index 2a2e586..acdd3bc 100644 --- a/doc/clzip.texinfo +++ b/doc/clzip.texinfo @@ -5,8 +5,8 @@ @finalout @c %**end of header -@set UPDATED 13 March 2010 -@set VERSION 1.0-rc3 +@set UPDATED 5 April 2010 +@set VERSION 1.0 @dircategory Data Compression @direntry @@ -58,6 +58,11 @@ gzip or bzip2. Clzip decompresses almost as fast as gzip and compresses better than bzip2, which makes it well suited for software distribution and data archiving. +Clzip uses the lzip file format; the files produced by clzip are fully +compatible with lzip-1.4 or newer. Clzip is in fact a C language version +of lzip, intended for embedded devices or systems lacking a C++ +compiler. + Clzip replaces every file given in the command line with a compressed version of itself, with the name "original_name.lz". Each compressed file has the same modification date, permissions, and, when possible, @@ -82,6 +82,7 @@ enum Mode { m_compress = 0, m_decompress, m_test }; char * output_filename = 0; int outfd = -1; +mode_t outfd_mode = S_IRUSR | S_IWUSR; bool delete_output_on_interrupt = false; @@ -320,8 +321,7 @@ static bool open_outstream( const bool force ) int flags = O_CREAT | O_WRONLY | o_binary; if( force ) flags |= O_TRUNC; else flags |= O_EXCL; - outfd = open( output_filename, flags, - S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH ); + outfd = open( output_filename, flags, outfd_mode ); if( outfd < 0 ) { if( errno == EEXIST ) outfd = -2; else outfd = -1; @@ -600,6 +600,7 @@ void cleanup_and_fail( const int retval ) { if( delete_output_on_interrupt ) { + delete_output_on_interrupt = false; if( verbosity >= 0 ) fprintf( stderr, "%s: Deleting output file `%s', if it exists.\n", program_name, output_filename ); @@ -831,6 +832,7 @@ int main( const int argc, const char * const argv[] ) strlen( default_output_filename ) + 1 ); strcpy( output_filename, default_output_filename ); } + outfd_mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; if( !open_outstream( force ) ) { if( outfd == -1 && retval < 1 ) retval = 1; @@ -855,6 +857,7 @@ int main( const int argc, const char * const argv[] ) if( program_mode == m_compress ) set_c_outname( input_filename, volume_size != LLONG_MAX ); else set_d_outname( input_filename, eindex ); + outfd_mode = S_IRUSR | S_IWUSR; if( !open_outstream( force ) ) { if( outfd == -1 && retval < 1 ) retval = 1; |