Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/zlib/deflate.c
Show First 20 Lines • Show All 1,616 Lines • ▼ Show 20 Lines | |||||
#define FLUSH_BLOCK(s, last) { \ | #define FLUSH_BLOCK(s, last) { \ | ||||
FLUSH_BLOCK_ONLY(s, last); \ | FLUSH_BLOCK_ONLY(s, last); \ | ||||
if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \ | if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \ | ||||
} | } | ||||
/* Maximum stored block length in deflate format (not including header). */ | /* Maximum stored block length in deflate format (not including header). */ | ||||
#define MAX_STORED 65535 | #define MAX_STORED 65535 | ||||
#if !defined(MIN) | |||||
/* Minimum of a and b. */ | /* Minimum of a and b. */ | ||||
#define MIN(a, b) ((a) > (b) ? (b) : (a)) | #define MIN(a, b) ((a) > (b) ? (b) : (a)) | ||||
#endif | |||||
/* =========================================================================== | /* =========================================================================== | ||||
* Copy without compression as much as possible from the input stream, return | * Copy without compression as much as possible from the input stream, return | ||||
* the current block state. | * the current block state. | ||||
* | * | ||||
* In case deflateParams() is used to later switch to a non-zero compression | * In case deflateParams() is used to later switch to a non-zero compression | ||||
* level, s->matches (otherwise unused when storing) keeps track of the number | * level, s->matches (otherwise unused when storing) keeps track of the number | ||||
* of hash table slides to perform. If s->matches is 1, then one hash table | * of hash table slides to perform. If s->matches is 1, then one hash table | ||||
▲ Show 20 Lines • Show All 529 Lines • Show Last 20 Lines |