"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "encoder.h" between
lzlib-1.12.tar.lz and lzlib-1.13.tar.lz

About: Lzlib is a data compression library providing in-memory LZMA compression and decompression functions using the lzip format.

encoder.h  (lzlib-1.12.tar.lz):encoder.h  (lzlib-1.13.tar.lz)
/* Lzlib - Compression library for the lzip format /* Lzlib - Compression library for the lzip format
Copyright (C) 2009-2021 Antonio Diaz Diaz. Copyright (C) 2009-2022 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided binary forms, with or without modification, are permitted provided
that the following conditions are met: that the following conditions are met:
1. Redistributions of source code must retain the above copyright 1. Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer. notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright 2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in the notice, this list of conditions, and the following disclaimer in the
skipping to change at line 195 skipping to change at line 195
static inline int LZeb_price_shortrep( const struct LZ_encoder_base * const eb, static inline int LZeb_price_shortrep( const struct LZ_encoder_base * const eb,
const State state, const int pos_state ) const State state, const int pos_state )
{ {
return price0( eb->bm_rep0[state] ) + price0( eb->bm_len[state][pos_state] ); return price0( eb->bm_rep0[state] ) + price0( eb->bm_len[state][pos_state] );
} }
static inline int LZeb_price_rep( const struct LZ_encoder_base * const eb, static inline int LZeb_price_rep( const struct LZ_encoder_base * const eb,
const int rep, const State state, const int rep, const State state,
const int pos_state ) const int pos_state )
{ {
int price;
if( rep == 0 ) return price0( eb->bm_rep0[state] ) + if( rep == 0 ) return price0( eb->bm_rep0[state] ) +
price1( eb->bm_len[state][pos_state] ); price1( eb->bm_len[state][pos_state] );
price = price1( eb->bm_rep0[state] ); int price = price1( eb->bm_rep0[state] );
if( rep == 1 ) if( rep == 1 )
price += price0( eb->bm_rep1[state] ); price += price0( eb->bm_rep1[state] );
else else
{ {
price += price1( eb->bm_rep1[state] ); price += price1( eb->bm_rep1[state] );
price += price_bit( eb->bm_rep2[state], rep - 2 ); price += price_bit( eb->bm_rep2[state], rep - 2 );
} }
return price; return price;
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)