internal int deflateParams(ZStream strm, int _level, int _strategy)
{
int result = 0;
if (_level == -1)
{
_level = 6;
}
if (_level < 0 || _level > 9 || _strategy < 0 || _strategy > 2)
{
return(-2);
}
if (Deflate.config_table[this.level].func != Deflate.config_table[_level].func && strm.total_in != 0L)
{
result = strm.deflate(1);
}
if (this.level != _level)
{
this.level = _level;
this.max_lazy_match = Deflate.config_table[this.level].max_lazy;
this.good_match = Deflate.config_table[this.level].good_length;
this.nice_match = Deflate.config_table[this.level].nice_length;
this.max_chain_length = Deflate.config_table[this.level].max_chain;
}
this.strategy = _strategy;
return(result);
}