diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:43:21 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:43:21 +0000 |
commit | 41463d1237df40b1cf3a1916057370c2913a5932 (patch) | |
tree | 159ebcfb30be0a014e2fa29b35235585ed256648 | |
parent | Adding debian version 1.15~rc1-1. (diff) | |
download | lziprecover-41463d1237df40b1cf3a1916057370c2913a5932.tar.xz lziprecover-41463d1237df40b1cf3a1916057370c2913a5932.zip |
Merging upstream version 1.15.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | Makefile.in | 3 | ||||
-rw-r--r-- | arg_parser.cc | 4 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | decoder.cc | 16 | ||||
-rw-r--r-- | decoder.h | 3 | ||||
-rw-r--r-- | doc/lziprecover.1 | 2 | ||||
-rw-r--r-- | doc/lziprecover.info | 32 | ||||
-rw-r--r-- | doc/lziprecover.texinfo | 15 | ||||
-rw-r--r-- | lzip.h | 4 |
10 files changed, 45 insertions, 49 deletions
@@ -1,16 +1,11 @@ -2013-07-29 Antonio Diaz Diaz <antonio@gnu.org> +2013-09-14 Antonio Diaz Diaz <antonio@gnu.org> - * Version 1.15-rc1 released. - * Minor changes. - * Added chapter 'Unzcrash' to the manual. - -2013-06-17 Antonio Diaz Diaz <antonio@gnu.org> - - * Version 1.15-pre1 released. + * Version 1.15 released. * repair.cc: Repair multi-member files with up to one byte error per member. * merge.cc: Merge multi-member files. - * Added chapters 'Repairing files' and 'Merging files' to the manual. + * Added chapters 'Repairing files', 'Merging files' and 'Unzcrash' + to the manual. 2013-05-31 Antonio Diaz Diaz <antonio@gnu.org> diff --git a/Makefile.in b/Makefile.in index bb69807..dbd1917 100644 --- a/Makefile.in +++ b/Makefile.in @@ -57,8 +57,7 @@ $(VPATH)/doc/$(pkgname).info : $(VPATH)/doc/$(pkgname).texinfo man : $(VPATH)/doc/$(progname).1 $(VPATH)/doc/$(progname).1 : $(progname) - help2man -n 'recovers data from damaged lzip files' \ - -o $@ ./$(progname) + help2man -n 'recovers data from damaged lzip files' -o $@ ./$(progname) Makefile : $(VPATH)/configure $(VPATH)/Makefile.in ./config.status diff --git a/arg_parser.cc b/arg_parser.cc index a28d2ba..5cb98a9 100644 --- a/arg_parser.cc +++ b/arg_parser.cc @@ -156,12 +156,12 @@ Arg_parser::Arg_parser( const int argc, const char * const argv[], while( argind < argc ) { const unsigned char ch1 = argv[argind][0]; - const unsigned char ch2 = ( ch1 ? argv[argind][1] : 0 ); + const unsigned char ch2 = ch1 ? argv[argind][1] : 0; if( ch1 == '-' && ch2 ) // we found an option { const char * const opt = argv[argind]; - const char * const arg = (argind + 1 < argc) ? argv[argind+1] : 0; + const char * const arg = ( argind + 1 < argc ) ? argv[argind+1] : 0; if( ch2 == '-' ) { if( !argv[argind][2] ) { ++argind; break; } // we found "--" @@ -6,7 +6,7 @@ # to copy, distribute and modify it. pkgname=lziprecover -pkgversion=1.15-rc1 +pkgversion=1.15 progname=lziprecover srctrigger=doc/${pkgname}.texinfo @@ -202,7 +202,7 @@ int LZ_decoder::decode_member( const Pretty_print & pp ) Bit_model bm_rep1[State::states]; Bit_model bm_rep2[State::states]; Bit_model bm_len[State::states][pos_states]; - Bit_model bm_dis_slot[max_dis_states][1<<dis_slot_bits]; + Bit_model bm_dis_slot[dis_states][1<<dis_slot_bits]; Bit_model bm_dis[modeled_distances-end_dis_model]; Bit_model bm_align[dis_align_size]; Len_model match_len_model; @@ -237,12 +237,7 @@ int LZ_decoder::decode_member( const Pretty_print & pp ) int len; if( rdec.decode_bit( bm_rep[state()] ) == 1 ) // 2nd bit { - if( rdec.decode_bit( bm_rep0[state()] ) == 0 ) // 3rd bit - { - if( rdec.decode_bit( bm_len[state()][pos_state] ) == 0 ) // 4th bit - { state.set_short_rep(); put_byte( get_byte( rep0 ) ); continue; } - } - else + if( rdec.decode_bit( bm_rep0[state()] ) == 1 ) // 3rd bit { unsigned distance; if( rdec.decode_bit( bm_rep1[state()] ) == 0 ) // 4th bit @@ -258,8 +253,13 @@ int LZ_decoder::decode_member( const Pretty_print & pp ) rep1 = rep0; rep0 = distance; } - len = min_match_len + rdec.decode_len( rep_len_model, pos_state ); + else + { + if( rdec.decode_bit( bm_len[state()][pos_state] ) == 0 ) // 4th bit + { state.set_short_rep(); put_byte( get_byte( rep0 ) ); continue; } + } state.set_rep(); + len = min_match_len + rdec.decode_len( rep_len_model, pos_state ); } else { @@ -214,7 +214,8 @@ class LZ_decoder uint32_t crc_; const int outfd; // output file descriptor - unsigned long long stream_position() const { return partial_data_pos + stream_pos; } + unsigned long long stream_position() const + { return partial_data_pos + stream_pos; } void flush_data(); bool verify_trailer( const Pretty_print & pp ) const; diff --git a/doc/lziprecover.1 b/doc/lziprecover.1 index f6712d1..cda6779 100644 --- a/doc/lziprecover.1 +++ b/doc/lziprecover.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH LZIPRECOVER "1" "July 2013" "Lziprecover 1.15-rc1" "User Commands" +.TH LZIPRECOVER "1" "September 2013" "Lziprecover 1.15" "User Commands" .SH NAME Lziprecover \- recovers data from damaged lzip files .SH SYNOPSIS diff --git a/doc/lziprecover.info b/doc/lziprecover.info index a15f890..5f8ad08 100644 --- a/doc/lziprecover.info +++ b/doc/lziprecover.info @@ -12,7 +12,7 @@ File: lziprecover.info, Node: Top, Next: Introduction, Up: (dir) Lziprecover Manual ****************** -This manual is for Lziprecover (version 1.15-rc1, 29 July 2013). +This manual is for Lziprecover (version 1.15, 14 September 2013). * Menu: @@ -325,7 +325,7 @@ additional information before, between, or after them. `ID string' A four byte string, identifying the lzip format, with the value - "LZIP". + "LZIP" (0x4C, 0x5A, 0x49, 0x50). `VN (version number, 1 byte)' Just in case something needs to be modified in the future. 1 for @@ -340,8 +340,8 @@ additional information before, between, or after them. Bits 4-0 contain the base 2 logarithm of the base size (12 to 29). Bits 7-5 contain the number of wedges (0 to 7) to substract from the base size to obtain the dictionary size. - Example: 0xD3 = (2^19 - 6 * 2^15) = (512KiB - 6 * 32KiB) = 320KiB - Valid values for dictionary size range from 4KiB to 512MiB. + Example: 0xD3 = 2^19 - 6 * 2^15 = 512 KiB - 6 * 32 KiB = 320 KiB + Valid values for dictionary size range from 4 KiB to 512 MiB. `Lzma stream' The lzma stream, finished by an end of stream marker. Uses default @@ -379,7 +379,7 @@ show status. lziprecover -tv file.lz -Example 3: Decompress `file.lz' partially until 10KiB of decompressed +Example 3: Decompress `file.lz' partially until 10 KiB of decompressed data are produced. lziprecover -D 0,10KiB file.lz @@ -467,7 +467,7 @@ programs with a suitable command line syntax. `-V' `--version' - Print the version number of lziprecover on the standard output and + Print the version number of unzcrash on the standard output and exit. `-b RANGE' @@ -541,16 +541,16 @@ Concept index Tag Table: Node: Top228 -Node: Introduction1095 -Node: Invoking lziprecover3248 -Node: Repairing files8686 -Node: Merging files9405 -Node: File format11176 -Node: Examples13660 -Ref: ddrescue-example14860 -Node: Unzcrash15969 -Node: Problems18344 -Node: Concept index18894 +Node: Introduction1096 +Node: Invoking lziprecover3249 +Node: Repairing files8687 +Node: Merging files9406 +Node: File format11177 +Node: Examples13687 +Ref: ddrescue-example14888 +Node: Unzcrash15997 +Node: Problems18369 +Node: Concept index18919 End Tag Table diff --git a/doc/lziprecover.texinfo b/doc/lziprecover.texinfo index e2aed0a..3dbceb9 100644 --- a/doc/lziprecover.texinfo +++ b/doc/lziprecover.texinfo @@ -6,8 +6,8 @@ @finalout @c %**end of header -@set UPDATED 29 July 2013 -@set VERSION 1.15-rc1 +@set UPDATED 14 September 2013 +@set VERSION 1.15 @dircategory Data Compression @direntry @@ -356,7 +356,8 @@ All multibyte values are stored in little endian order. @table @samp @item ID string -A four byte string, identifying the lzip format, with the value "LZIP". +A four byte string, identifying the lzip format, with the value "LZIP" +(0x4C, 0x5A, 0x49, 0x50). @item VN (version number, 1 byte) Just in case something needs to be modified in the future. 1 for now. @@ -369,8 +370,8 @@ wedges between 0 and 7. The size of a wedge is (base_size / 16).@* Bits 4-0 contain the base 2 logarithm of the base size (12 to 29).@* Bits 7-5 contain the number of wedges (0 to 7) to substract from the base size to obtain the dictionary size.@* -Example: 0xD3 = (2^19 - 6 * 2^15) = (512KiB - 6 * 32KiB) = 320KiB@* -Valid values for dictionary size range from 4KiB to 512MiB. +Example: 0xD3 = 2^19 - 6 * 2^15 = 512 KiB - 6 * 32 KiB = 320 KiB@* +Valid values for dictionary size range from 4 KiB to 512 MiB. @item Lzma stream The lzma stream, finished by an end of stream marker. Uses default values @@ -413,7 +414,7 @@ lziprecover -tv file.lz @sp 1 @noindent -Example 3: Decompress @samp{file.lz} partially until 10KiB of +Example 3: Decompress @samp{file.lz} partially until 10 KiB of decompressed data are produced. @example @@ -529,7 +530,7 @@ Print an informative help message describing the options and exit. @item -V @itemx --version -Print the version number of lziprecover on the standard output and exit. +Print the version number of unzcrash on the standard output and exit. @item -b @var{range} @itemx --bits=@var{range} @@ -68,10 +68,10 @@ enum { max_match_len = min_match_len + max_len_symbols - 1, // 273 min_match_len_limit = 5, - max_dis_states = 4 }; + dis_states = 4 }; inline int get_dis_state( const int len ) - { return std::min( len - min_match_len, max_dis_states - 1 ); } + { return std::min( len - min_match_len, dis_states - 1 ); } inline int get_lit_state( const uint8_t prev_byte ) { return ( prev_byte >> ( 8 - literal_context_bits ) ); } |