Trouble with gzipped files

Alexander Neundorf neundorf at
Fri Jun 20 19:21:58 BST 2003

On Friday 20 June 2003 18:36, Luis Pedro Coelho wrote:
> Hash: SHA1
> Le Friday 20 June 2003 18:13, Lubos Lunak a écrit :
> >  Hello,
> Hi,
> Thanks for posting this. I had thought about posting this here myself, but
> I was still hoping I might find a solution myselft before bothering anyone
> else
> :)
> :
> >  mimetypes wizard needed. Say that I have a couple of .ps.gz files, and
> > when browsing them in Konqueror, I want to view them in KGhostview (this
> > is actually from a user posting at a local newsgroup).
> This is also Bug 59856 { }.
> In that bug's small discussion, Thiago suggested assigning
> application/postscript; compression=gzip to *.ps.gz

I think it must be now almost exactly one year ago, when I myself hacked a bit 
on this issue.
It was somewhere in KMimeMagic::match() (in kdelibs/kio/kio), where I added 
some lines so that if it found a g/bzipped file while detecting the mimetype, 
it uncompressed the first bytes of this file (maybe 4KB or 1 KB or something 
like this) and then tried to determine the mimetye of this uncompressed data.
If it found something known in the uncompressed data (e.g. postscript), it 
returned a mimetype like text/html-gzip. Additionally I added mimetype files 
for gzipped postscript, html, text and troff files.
But after some discussion on the list this wasn't considered a good approach.

I still have the sources here, in the case somebody is interested.

Work: alexander.neundorf at -
Home: neundorf at                -
      alex at               -

More information about the kde-core-devel mailing list