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