Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: FlateDecode, ASCIIHexDecode, ASCII85Decode, and LZWDecode streams

6 views
Skip to first unread message

Fren Zeee

unread,
Jun 26, 2010, 7:52:16 PM6/26/10
to
On Jun 24, 12:53 am, bugbear <bugbear@trim_papermule.co.uk_trim>
wrote:
> Fren Zeee wrote:
> > Dear All,
>
> > I have been playing for a while with files that have small bits of
> > FlateDecode, ASCIIHexDecode, ASCII85Decode, and LZWDecode streams. My
> > familiarity with these compression methods is limited to using the
> > unix uncompress, gunzip and other compiled commands. At one time I was
> > able to conveniently decode base64 fragments in emacs using the
> > following commands.
>
> > base64-decode-region
> >   Command: Base64-decode the region between BEG and END.
>
> > hexlify-buffer and dehexlify-buffer
>
> > Is there a solution within emacs or someone has a method to use
> > libraries or to translate code from python/ruby etc. I could not find
> > any (apropos decode) with reference to the above compression methods.
>
> > In ruby, FlateDecode and ASCII85Decode can be decompressed with
> > existing ruby module which are zlib and Ascii85.
>
> The PostScript spec either directly, or via authoritative references,
> documents the compression formats.
>
> Further, since PostScript (doh!) supports these formats,
> you can simply use the Filter implementations
> in PostScript (e.g. GhostScript) to decompress data.
>
>    BugBear

I did not get enough ideas so I am expanding my posting from

gnu.emacs.help, gnu.emacs.sources, gnu.emacs.gnus, comp.text.pdf

to

gnu.emacs.help,comp.lang.lisp,comp.compression,comp.lang.scheme,comp.text.pdf

Icarus Sparry

unread,
Jun 28, 2010, 10:20:03 PM6/28/10
to


Whilst one could write code to do this, you are better off using your
existing knowledge and commands. In particular "shell-command-on-
region" (normal binding M-| ) allows you to feed a piece of a buffer
through an external command such as the uncompress, and gunzip commands
you list. If you invoke it with a prefix then the region is replaced by
the output.


0 new messages