GNOME Bugzilla – Bug 413220
Support gzipped files (xxx.gz)
Last modified: 2010-05-23 07:47:37 UTC
vi can display these. Would be cool if gedit could do this as well
what about file-roller?
It works but for instance in Ubuntu/Debian you have many files which are called README.gz. Just typing gedit README.gz is easier then using file roller becaus you have to click multiple times in file roller to view the file
ah, not tar.gz ones, ok. Paolo?
Created attachment 87164 [details] [review] Read gzipped file Here is an attempt to detect and read gzipped files. It works only on local files.
Scrivo il mio commento in italiano perchè, avendo problemi con l'inglese, rischierei di non riuscire a inviare correttamente il suggerimento che ho in merito a Gedit. Semplicemente ho notato che evince apre i documenti pdf gzippati e così posso storare i miei documenti in pdf.gz o pdf.bz2 risparmiando spazio ma al contempo non devo preoccuparmi di estrarre il file per aprirlo. Anche inkscape apre file svg.gz e gimp i file xcf.gz nonchè xcf.bz2. Sarebbe comodo fare la stessa cosa con gedit aprendo file testuali compressi e salvandoli direttamente compressi, ad esempio txt.gz, txt.bz2, txt.7z anche perchè molte distribuzioni archiviano i file testuali nei pacchetti comprimendoli e per evitare di estrarre i pacchetti si può usare il comando zcat ma da gedit sarebbe un'altra cosa. Magari si potrebbe estendere la funzionalità anche alle altre estensioni di file. Ho letto su bugzilla vecchie proposte simile alla mia con l'uso di gnome-vfs (che ora non c'è più in gnome 2.22 credo) ma la mia proposta è quella di implementare le funzioni nel codice di gedit stesso come avviene in inkscape o gimp per capirci in maniera che si possa aprire un file README.TXT.BZ2 per esempio, scriverci dentro e salvarlo direttamente.
Can you add suppport for gzip, bip2 and xz ?
*** Bug 618246 has been marked as a duplicate of this bug. ***
Since we moved to gio, reading/writing gz files has become trivial. Support for simple reading/writing has been pushed to gedit master (due to a bug in gio, the writing requires the latest gio from git to work properly). There is no full blown support in the sense that you can't choose compression from the save-as dialog, also content-type detection is not as nice as it could be. I've setup a separate branch (compression) for review to implement this more advanced support for compressed files.
Created attachment 160969 [details] [review] Full file compression support Patch from the compression branch. Implements full support for compressed files.
We decided to make the compression implicit, based on the mime type. This means that: 1) Normal loading and saving of compressed files will just work transparently 2) On save-as, the mime type is detected based on the file name, and checked if it is a subtype of application/x-gzip. If the file was plain text before, but saved as compressed (or the other way around), the user is asked for confirmation to do so. This basicly solves all the common cases of using compressed files (at least gzip compressed). For example working with .svg or the compressed form .svgz will work as expected.
Thanks for fixing this :-)