summaryrefslogtreecommitdiffstats
path: root/lzip.h
diff options
context:
space:
mode:
Diffstat (limited to 'lzip.h')
-rw-r--r--lzip.h31
1 files changed, 10 insertions, 21 deletions
diff --git a/lzip.h b/lzip.h
index aac0bd8..92e015e 100644
--- a/lzip.h
+++ b/lzip.h
@@ -1,5 +1,5 @@
/* Lzlib - Compression library for lzip files
- Copyright (C) 2009, 2010, 2011, 2012, 2013 Antonio Diaz Diaz.
+ Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Antonio Diaz Diaz.
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -56,7 +56,7 @@ static inline State St_set_short_rep( const State st )
enum {
min_dictionary_bits = 12,
- min_dictionary_size = 1 << min_dictionary_bits,
+ min_dictionary_size = 1 << min_dictionary_bits, /* >= modeled_distances */
max_dictionary_bits = 29,
max_dictionary_size = 1 << max_dictionary_bits,
literal_context_bits = 3,
@@ -174,7 +174,8 @@ static inline void CRC32_update_byte( uint32_t * const crc, const uint8_t byte )
{ *crc = crc32[(*crc^byte)&0xFF] ^ ( *crc >> 8 ); }
static inline void CRC32_update_buf( uint32_t * const crc,
- const uint8_t * const buffer, const int size )
+ const uint8_t * const buffer,
+ const int size )
{
int i;
for( i = 0; i < size; ++i )
@@ -254,41 +255,29 @@ enum { Ft_size = 20 };
static inline unsigned Ft_get_data_crc( const File_trailer data )
{
unsigned tmp = 0;
- int i;
- for( i = 3; i >= 0; --i ) { tmp <<= 8; tmp += data[i]; }
+ int i; for( i = 3; i >= 0; --i ) { tmp <<= 8; tmp += data[i]; }
return tmp;
}
static inline void Ft_set_data_crc( File_trailer data, unsigned crc )
- {
- int i;
- for( i = 0; i <= 3; ++i ) { data[i] = (uint8_t)crc; crc >>= 8; }
- }
+ { int i; for( i = 0; i <= 3; ++i ) { data[i] = (uint8_t)crc; crc >>= 8; } }
static inline unsigned long long Ft_get_data_size( const File_trailer data )
{
unsigned long long tmp = 0;
- int i;
- for( i = 11; i >= 4; --i ) { tmp <<= 8; tmp += data[i]; }
+ int i; for( i = 11; i >= 4; --i ) { tmp <<= 8; tmp += data[i]; }
return tmp;
}
static inline void Ft_set_data_size( File_trailer data, unsigned long long sz )
- {
- int i;
- for( i = 4; i <= 11; ++i ) { data[i] = (uint8_t)sz; sz >>= 8; }
- }
+ { int i; for( i = 4; i <= 11; ++i ) { data[i] = (uint8_t)sz; sz >>= 8; } }
static inline unsigned long long Ft_get_member_size( const File_trailer data )
{
unsigned long long tmp = 0;
- int i;
- for( i = 19; i >= 12; --i ) { tmp <<= 8; tmp += data[i]; }
+ int i; for( i = 19; i >= 12; --i ) { tmp <<= 8; tmp += data[i]; }
return tmp;
}
static inline void Ft_set_member_size( File_trailer data, unsigned long long sz )
- {
- int i;
- for( i = 12; i <= 19; ++i ) { data[i] = (uint8_t)sz; sz >>= 8; }
- }
+ { int i; for( i = 12; i <= 19; ++i ) { data[i] = (uint8_t)sz; sz >>= 8; } }