Trouble with gzipped files

Thiago Macieira thiagom at
Fri Jun 20 22:58:19 BST 2003

Luis Pedro Coelho wrote:
>In that bug's small discussion, Thiago suggested assigning
>application/postscript; compression=gzip to *.ps.gz
>This seems very logical, but I don't really know whether this corresponds to
>any convention used elsewhere. I tried look through the existing mimetype
>[Thiago, can you answer this? I am CCing you bc of this question].

No, I am not aware of this approach being used anywhere. But from my 
understanding of the MIME RFCs and our current situation, I think this would 
be the most interesting approach.

>At first, I hoped that passing "application/postscript; compression=gzip" to
>deviceForFile would get me a gzip filter, but it doesn't seem to. I am not
>sure whether this is a bug or a feature.

Well, I'm sorry to disappoint you. I mentioned "application/postscript; 
compression=gzip" in the bug report but I wasn't clear enough: that's what I 
believe the MIME type should be. What I failed to say is that this is not 
currently supported in KDE.

>I sometimes see posts about a mimetype hierarchy system, where I imagine one
>would have (in pseudo-OOP syntax)
>namespace application {
>mimetype "x-gzip"
>mimetype "postscript"
>mimetype "postscript;compression=gzip" extends x-gzip, postscript

Now that would be interesting and would open up for new possibilities, even 
though by far the most beneficial would be compressions. Even if we don't 
implement a hierarchy system -- which could be slow and cumbersome -- 
handling of MIME type attributes should be possible. 

HTTP uses a slightly different approach, which is:
Content-Type: application/postscript
Content-Encoding: gzip

This is another solution.

>Thinking smaller, just allowing "application/postscript;compression=gzip" to
>find kghostview which offers "application/postscript, Application" and
>"application/postscript,Browser/View" and then inside the app, let it find
>the correct filter would be great. No apps would need much to handle
>compression, if that was the case.

That would be generally the idea. It would allow the correct application to be 
found as well as the correct filter for inside that app.

Alexander Neundorf wrote:
> 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 think we should get back to your idea. While creating new MIME types for 
each possibility doesn't strike me as a good approach, maybe using the 
attributes would solve the situation.

  Thiago Macieira  -  Registered Linux user #65028
   thiagom at           
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <>

More information about the kde-core-devel mailing list