From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Mysterious gzipped images
Date: Mon, 12 Aug 2013 16:05:35 +0200 [thread overview]
Message-ID: <m3r4dz0ztc.fsf@stories.gnus.org> (raw)
In-Reply-To: <jwv7gfru48y.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 11 Aug 2013 20:54:31 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> 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.
`zlib' won. I've now renamed the function.
> 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.
Hm... could it be a DEFLATE format thing? Uhm... RFC1951, apparently,
according to the manual:
http://www.zlib.net/manual.html
zlib should support decompressing that, too -- I think the only thing
that should need twiddling is the inflateInit2 call, which takes magical
badly documented parameters to tell it what to do...
I think. The real documentation is in /usr/include/zlib.h. Read the
bit about inflateInit2 and scratch your head...
> 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.
If you have some test files, I can try to see if I can get zlib to do
the right thing.
--
(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
next prev parent reply other threads:[~2013-08-12 14:05 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 22:20 Mysterious gzipped images Lars Magne Ingebrigtsen
2013-08-06 22:30 ` Lars Magne Ingebrigtsen
2013-08-06 23:05 ` Andreas Schwab
2013-08-06 23:38 ` Lars Magne Ingebrigtsen
2013-08-07 1:08 ` Lars Magne Ingebrigtsen
2013-08-07 8:51 ` Julien Danjou
2013-08-07 14:35 ` Stefan Monnier
2013-08-07 16:47 ` chad
2013-08-08 10:35 ` Lars Magne Ingebrigtsen
2013-08-08 10:57 ` Andreas Schwab
2013-08-11 19:44 ` Lars Magne Ingebrigtsen
2013-08-08 13:22 ` Paul Eggert
2013-08-08 14:06 ` Lars Magne Ingebrigtsen
2013-08-08 15:31 ` Lars Magne Ingebrigtsen
2013-08-11 22:05 ` Lars Magne Ingebrigtsen
2013-08-08 13:24 ` Romain Francoise
2013-08-08 13:28 ` Lars Magne Ingebrigtsen
2013-08-08 13:36 ` Christopher Schmidt
2013-08-08 13:55 ` Lars Magne Ingebrigtsen
2013-08-08 14:06 ` Christopher Schmidt
2013-08-08 14:09 ` Lars Magne Ingebrigtsen
2013-08-08 15:43 ` Romain Francoise
2013-08-08 15:52 ` Lars Magne Ingebrigtsen
2013-08-11 19:51 ` Lars Magne Ingebrigtsen
2013-08-08 14:47 ` Stefan Monnier
2013-08-11 19:47 ` Lars Magne Ingebrigtsen
2013-08-12 0:54 ` Stefan Monnier
2013-08-12 14:05 ` Lars Magne Ingebrigtsen [this message]
2013-08-12 15:09 ` Stefan Monnier
2013-08-12 15:20 ` Eli Zaretskii
2013-08-12 16:27 ` Lars Magne Ingebrigtsen
2013-08-12 16:42 ` Eli Zaretskii
2013-08-12 12:13 ` Eli Zaretskii
2013-08-12 12:21 ` Eli Zaretskii
2013-08-12 13:06 ` Lars Magne Ingebrigtsen
2013-08-12 13:29 ` Eli Zaretskii
2013-08-13 23:40 ` Lars Magne Ingebrigtsen
2013-08-14 13:09 ` Lars Magne Ingebrigtsen
2013-08-14 15:12 ` Eli Zaretskii
2013-08-17 15:01 ` Lars Magne Ingebrigtsen
2013-08-17 15:27 ` Eli Zaretskii
2013-08-17 17:04 ` Eli Zaretskii
2013-08-18 17:06 ` Lars Magne Ingebrigtsen
2013-08-07 18:25 ` Rüdiger Sonderfeld
2013-08-07 21:06 ` FFI (was: Mysterious gzipped images) Stefan Monnier
2013-08-08 0:50 ` Stephen J. Turnbull
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3r4dz0ztc.fsf@stories.gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.