From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Mysterious gzipped images Date: Mon, 12 Aug 2013 18:27:28 +0200 Message-ID: References: <87mwoul8sz.fsf@igel.home> <83pptjos04.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1376324883 2248 80.91.229.3 (12 Aug 2013 16:28:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Aug 2013 16:28:03 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 12 18:28:02 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V8uyQ-0008K7-6d for ged-emacs-devel@m.gmane.org; Mon, 12 Aug 2013 18:28:02 +0200 Original-Received: from localhost ([::1]:43364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8uyP-0004zQ-OC for ged-emacs-devel@m.gmane.org; Mon, 12 Aug 2013 12:28:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8uyG-0004pB-My for emacs-devel@gnu.org; Mon, 12 Aug 2013 12:27:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8uy9-0002cf-9J for emacs-devel@gnu.org; Mon, 12 Aug 2013 12:27:52 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:33742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8uy8-0002bl-TA; Mon, 12 Aug 2013 12:27:45 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1V8uxs-00028L-VK; Mon, 12 Aug 2013 18:27:29 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUAAAB5bma/saOUh3uJ fXOnmYxEPzqcj4I714nFAAACSklEQVQ4jVVUPXfiMBBUCqgRnzW6KLRH1jy16GygPWQUt3ABUmOj t3//diXMxxYGz+zMjvQsCZGqO9BzKRe7vXitNy/PXIfJ+hWvxgQeJD2Pz0yXcJlqfD72HsRqfZD3 Oh/uczqXJ5yYcUtU8rVaSecSX4fDoiiGadCLoIiVmCh5297784wed8k/yzh3Z0nEzN2pSEyW53nB jb3kZFNrDkBUxgx5dea3fsuGTEUzIUZtILna2fEAAOKYvcAWr7X3ak12kBU8ZEpJczLq6yo4p4/G ANv2xJacydYqTwTW07whM2vH4hKDFn3PZSd60EBDjBSXtLRPRFTaVs6iaSiZFIxDZrWVg+0ozOot WXGySNBydVDgvKnCOyBTTOQUcVGhwnJhSpxtEDmxIJyIgGj1LixKmCFSYgDBO0QEgPtVejiYqkKu RkS8CbDRpiyzGnHGMKJg3Ji6WBWrq1e6WRDBIsERDNYDRdtVgmk+qxDNBNKkxoRSX/OCiEuNFARD JTZpxpR/SoNWkVHwfismNKlB44Ymy0u4jmbUjd5/iVOU8rYWpLCOfUjxV3xXkUAlM1PaEYclgV+K Az05RtAZyJECoLTeu73oEhGDB0XVmCSo6Gz0bxIDaUk0wLsP+uBOmjWRATZigftNxFnp5NYg0B5F geKvuttXLrnxgrjfq494DL6Vat1on6jfqXQMu7VS8RvhnNHo/XbUftSNiUUvy/Y0/3li6O/0cc55 bco5tqF6ujZ+1FMtxVOdHvjX6y1zbPHXS4Y3YEKonp/b9//zePdcS0efeQAAAABJRU5ErkJggg== X-Now-Playing: Public Image Ltd.'s _Metal Box_: "No Birds" X-Hashcash: 1:23:130812:eliz@gnu.org::S2CaeP+5qxaGSnAC:000008Xjp X-Hashcash: 1:23:130812:emacs-devel@gnu.org::vV3f53lq3CHhZjnH:000000000000000000000000000000000000000000jjzV X-Hashcash: 1:23:130812:monnier@iro.umontreal.ca::g+9qEOyobjZZCKgi:0000000000000000000000000000000000000piKu In-Reply-To: <83pptjos04.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 12 Aug 2013 18:20:27 +0300") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-MailScanner-ID: 1V8uxs-00028L-VK MailScanner-NULL-Check: 1376929649.35592@dngNEo+QBGXGkPiR+Zz3GQ X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162629 Archived-At: Eli Zaretskii writes: > But having both "zlib" and "gzipped" in the name is redundant, I > think. How about zlib-decompress-region? zlib supports both decompressing gzip-format data and the older format which is just called "zlib". It's a bit confusing. So if we choose to offer decompressing the older format in the future, then it would be called `zlib-decompress-zlibbed-region'. Or something. >"? And as Stefan said, there's possibly a "headerless gzip" format used for streaming and pdfs, which would (possibly) need a different calling sequence. I'm not sure how much code would be shared between these functions, but if the main loop is identical, then it would make sense to rename this function to `zlib-decompress-region' and have the format be a third parameter (`gzip', `zlib', `gzip-without-a-header')... Hm... ---- windowBits can also be greater than 15 for optional gzip decoding. Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection, or add 16 to decode only the gzip format (the zlib format will return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a crc32 instead of an adler32. ---- Oh, we can actually get automatic detection of the zlib and gzip format by using a different magical constant. If we did that, then it would totally make sense to rename the function. -- (domestic pets only, the antidote for overdose, milk.) No Gnus T-Shirt for sale: http://ingebrigtsen.no/no.php and http://lars.ingebrigtsen.no/2013/08/twenty-years-of-september.html