You can do it in zlib -- there&#x27;s one call that effectively does the whole thing, and one that fills a buffer. You can check to see how much input has been consumed, if there&#x27;s more, then you know you&#x27;re getting large. It&#x27;s up to the friendly programmer to decide when large is too large.