summaryrefslogtreecommitdiffstats
path: root/lzip.h
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 13:49:25 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 13:49:25 +0000
commita9c3fa13430e0d6d6a0b61e70a8cfb1b15e84d4e (patch)
tree28dd368a0fc8339a5b027678819407ff0a41333e /lzip.h
parentAdding debian version 1.4-3. (diff)
downloadlzlib-a9c3fa13430e0d6d6a0b61e70a8cfb1b15e84d4e.tar.xz
lzlib-a9c3fa13430e0d6d6a0b61e70a8cfb1b15e84d4e.zip
Merging upstream version 1.5~rc1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'lzip.h')
-rw-r--r--lzip.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/lzip.h b/lzip.h
index d3b1254..df1beca 100644
--- a/lzip.h
+++ b/lzip.h
@@ -1,4 +1,4 @@
-/* Lzlib - A compression library for lzip files
+/* Lzlib - Compression library for lzip files
Copyright (C) 2009, 2010, 2011, 2012, 2013 Antonio Diaz Diaz.
This library is free software: you can redistribute it and/or modify
@@ -208,7 +208,7 @@ static inline uint8_t Fh_version( const File_header data )
{ return data[4]; }
static inline bool Fh_verify_version( const File_header data )
- { return ( data[4] <= 1 ); }
+ { return ( data[4] == 1 ); }
static inline unsigned Fh_get_dictionary_size( const File_header data )
{
@@ -218,15 +218,15 @@ static inline unsigned Fh_get_dictionary_size( const File_header data )
return sz;
}
-static inline bool Fh_set_dictionary_size( File_header data, const int sz )
+static inline bool Fh_set_dictionary_size( File_header data, const unsigned sz )
{
if( sz >= min_dictionary_size && sz <= max_dictionary_size )
{
data[5] = real_bits( sz - 1 );
if( sz > min_dictionary_size )
{
- const int base_size = 1 << data[5];
- const int wedge = base_size / 16;
+ const unsigned base_size = 1 << data[5];
+ const unsigned wedge = base_size / 16;
int i;
for( i = 7; i >= 1; --i )
if( base_size - ( i * wedge ) >= sz )
@@ -252,9 +252,6 @@ typedef uint8_t File_trailer[20];
enum { Ft_size = 20 };
-static inline int Ft_versioned_size( const int version )
- { return ( ( version >= 1 ) ? 20 : 12 ); }
-
static inline unsigned Ft_get_data_crc( const File_trailer data )
{
unsigned tmp = 0;