Gnus development mailing list
 help / color / mirror / Atom feed
* doubly-gzipped files
@ 1998-11-16 13:25 Alexandre Oliva
  1998-11-17 23:55 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Alexandre Oliva @ 1998-11-16 13:25 UTC (permalink / raw)




Hi!

jka-compr is enabled by default on my site.  Whenever I save a gzipped
attachment with the extension .gz, jka-compr will gzip it at save
time, so I'll have to gunzip it twice to obtain the uncompressed
contents.  Is there any way GNUS could disable jka-compr (and any kind
of translation, for that matter) for the buffer in which it saves
files?

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org.au}
Universidade Estadual de Campinas, SP, Brasil



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: doubly-gzipped files
  1998-11-16 13:25 doubly-gzipped files Alexandre Oliva
@ 1998-11-17 23:55 ` Lars Magne Ingebrigtsen
  1998-11-18 15:38   ` Edward J. Sabol
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-11-17 23:55 UTC (permalink / raw)


Alexandre Oliva <oliva@dcc.unicamp.br> writes:


> jka-compr is enabled by default on my site.  Whenever I save a gzipped
> attachment with the extension .gz, jka-compr will gzip it at save
> time, so I'll have to gunzip it twice to obtain the uncompressed
> contents.  Is there any way GNUS could disable jka-compr (and any kind
> of translation, for that matter) for the buffer in which it saves
> files?

Hm.  Good question.  On the one hand, it should be possible to say
that the file should be saved to "something.gz" to signal that you
want "something" to be gzipped.  But if the thing already has been
gzipped, and you just want to save it, that's not possible.  So I
don't know how to work around this problem...

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: doubly-gzipped files
  1998-11-17 23:55 ` Lars Magne Ingebrigtsen
@ 1998-11-18 15:38   ` Edward J. Sabol
  1998-11-19  2:44     ` Lars Magne Ingebrigtsen
  1998-11-20  4:40     ` Stephen Zander
  0 siblings, 2 replies; 5+ messages in thread
From: Edward J. Sabol @ 1998-11-18 15:38 UTC (permalink / raw)


Excerpts from mail: (18-Nov-98) Re: doubly-gzipped files by Lars Magne Ingebrigtsen
> On the one hand, it should be possible to say that the file should be saved
> to "something.gz" to signal that you want "something" to be gzipped. But if
> the thing already has been gzipped, and you just want to save it, that's
> not possible. So I don't know how to work around this problem...

How about at least turning off jka-compr when the Content-Type is
application/x-gzip or the filename specified in the Content-Disposition ends
with ".gz"? You can do the same for uuencoded attachments where the filename
ends with ".gz" as well. That should catch just about all cases where the
problem arises.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: doubly-gzipped files
  1998-11-18 15:38   ` Edward J. Sabol
@ 1998-11-19  2:44     ` Lars Magne Ingebrigtsen
  1998-11-20  4:40     ` Stephen Zander
  1 sibling, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-11-19  2:44 UTC (permalink / raw)


"Edward J. Sabol" <sabol@alderaan.gsfc.nasa.gov> writes:

> How about at least turning off jka-compr when the Content-Type is
> application/x-gzip or the filename specified in the Content-Disposition ends
> with ".gz"? You can do the same for uuencoded attachments where the filename
> ends with ".gz" as well. That should catch just about all cases where the
> problem arises.

If someone could suggest patches to do this, I'd apply them.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: doubly-gzipped files
  1998-11-18 15:38   ` Edward J. Sabol
  1998-11-19  2:44     ` Lars Magne Ingebrigtsen
@ 1998-11-20  4:40     ` Stephen Zander
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Zander @ 1998-11-20  4:40 UTC (permalink / raw)
  Cc: Gnus Mailing List



>>>>> "Edward" == Edward J Sabol <sabol@alderaan.gsfc.nasa.gov> writes:
    Edward> How about at least turning off jka-compr when the
    Edward> Content-Type is application/x-gzip or the filename
    Edward> specified in the Content-Disposition ends with ".gz"? You
    Edward> can do the same for uuencoded attachments where the
    Edward> filename ends with ".gz" as well. That should catch just
    Edward> about all cases where the problem arises.

Could you not just check the whether the attachment is compressed by
looking at the file?  If the first two bytes are \037\213 then it's
likely that file was compressed with the gzip algorithm.  Similarly,
if the file starts with \037\235, it's likely file was compressed
using LZW (aka compress).

Checking the Content-Type is good, but determination of filetype by
extension is *evil* :)

-- 
Stephen
---
Perl is really designed more for the guys that will hack Perl at least
20 minutes a day for the rest of their career.  TCL/Python is more a
"20 minutes a week", and VB is probably in that "20 minutes a month"
group. :) -- Randal Schwartz


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-11-20  4:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-16 13:25 doubly-gzipped files Alexandre Oliva
1998-11-17 23:55 ` Lars Magne Ingebrigtsen
1998-11-18 15:38   ` Edward J. Sabol
1998-11-19  2:44     ` Lars Magne Ingebrigtsen
1998-11-20  4:40     ` Stephen Zander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).