Adding upstream version 1.15.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
6a117924f6
commit
abf5fed346
10 changed files with 45 additions and 49 deletions
13
ChangeLog
13
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>
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -156,7 +156,7 @@ 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
|
||||
{
|
||||
|
|
2
configure
vendored
2
configure
vendored
|
@ -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
|
||||
|
||||
|
|
16
decoder.cc
16
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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,7 +340,7 @@ 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
|
||||
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'
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -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,7 +370,7 @@ 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@*
|
||||
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
|
||||
|
@ -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}
|
||||
|
|
4
lzip.h
4
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 ) ); }
|
||||
|
|
Loading…
Add table
Reference in a new issue