From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Mysterious gzipped images Date: Sun, 11 Aug 2013 20:54:31 -0400 Message-ID: References: <87mwoul8sz.fsf@igel.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1376268890 15960 80.91.229.3 (12 Aug 2013 00:54:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Aug 2013 00:54:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 12 02:54:51 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 1V8gPL-0001sH-8b for ged-emacs-devel@m.gmane.org; Mon, 12 Aug 2013 02:54:51 +0200 Original-Received: from localhost ([::1]:45285 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8gPK-0002Dh-OR for ged-emacs-devel@m.gmane.org; Sun, 11 Aug 2013 20:54:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8gPA-0002Cr-IG for emacs-devel@gnu.org; Sun, 11 Aug 2013 20:54:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8gP3-0004tV-8G for emacs-devel@gnu.org; Sun, 11 Aug 2013 20:54:40 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:17473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8gP3-0004tM-3I for emacs-devel@gnu.org; Sun, 11 Aug 2013 20:54:33 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFLd/Nq/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFFLd/Nq/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="21438162" Original-Received: from 75-119-243-106.dsl.teksavvy.com (HELO pastel.home) ([75.119.243.106]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Aug 2013 20:54:25 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 4DF0562CC0; Sun, 11 Aug 2013 20:54:31 -0400 (EDT) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 11 Aug 2013 21:47:33 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:162594 Archived-At: > Sure, renaming from `decompress-gzipped-region' to something more > prefixey would make sense. Do you prefer zlib (which is what the zlib > people call it), or libz (which is what all other people call their > libraries)? If (random 2) return 1, then "libz-" is the clear winner, but if it returns 0 then "zlib-" is way better. >> Stefan "Hmm... looks like this doesn't include a function to >> decompress PDF data yet :-(" > Does PDF need decompression? I have Elisp code that reads a PDF file and returns the number of pages it has (I use it in doc-view to determine the last page without having to render the whole file), but it doesn't work in recent PDFs because the index is now compressed using some kind of gzip but without the usual file header, kind of like the gzip compression used in ssh. This PDF-reading code is only in my local changes because without support for current PDFs it's pretty useless. But its absence in trunk also makes it harder (read: not installed yet) to provide good support for lazy-rendering (i.e. only render those pages you look at), which is a feature I use a lot and that some users have requested. Hence, it'd be nice if zlib could provide the function I need to decompress the index at the end of PDF files. Stefan