summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:43:15 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:43:15 +0000
commitaffb7986cd388facf63f26a5dd7bd680b866bdf8 (patch)
tree86080ad96b070d413e931908ad1f82ca9348fbc8
parentAdding upstream version 1.15~rc1. (diff)
downloadlziprecover-affb7986cd388facf63f26a5dd7bd680b866bdf8.tar.xz
lziprecover-affb7986cd388facf63f26a5dd7bd680b866bdf8.zip
Adding upstream version 1.15.upstream/1.15
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
-rw-r--r--ChangeLog13
-rw-r--r--Makefile.in3
-rw-r--r--arg_parser.cc4
-rwxr-xr-xconfigure2
-rw-r--r--decoder.cc16
-rw-r--r--decoder.h3
-rw-r--r--doc/lziprecover.12
-rw-r--r--doc/lziprecover.info32
-rw-r--r--doc/lziprecover.texinfo15
-rw-r--r--lzip.h4
10 files changed, 45 insertions, 49 deletions
diff --git a/ChangeLog b/ChangeLog
index ce920e8..9011c74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 "--"
diff --git a/configure b/configure
index 1c2c182..acd569a 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/decoder.cc b/decoder.cc
index 379aa3d..21a225e 100644
--- a/decoder.cc
+++ b/decoder.cc
@@ -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
{
diff --git a/decoder.h b/decoder.h
index 59c3adc..1269728 100644
--- a/decoder.h
+++ b/decoder.h
@@ -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}
diff --git a/lzip.h b/lzip.h
index dec0aae..bdc4c61 100644
--- a/lzip.h
+++ b/lzip.h
@@ -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 ) ); }