After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 413220 - Support gzipped files (xxx.gz)
Support gzipped files (xxx.gz)
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Gedit maintainers
Gedit maintainers
: 618246 (view as bug list)
Depends on: 617937
Blocks:
 
 
Reported: 2007-02-28 21:18 UTC by Jaap A. Haitsma
Modified: 2010-05-23 07:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Read gzipped file (1.29 KB, patch)
2007-04-27 19:35 UTC, Thibaud
rejected Details | Review
Full file compression support (38.88 KB, patch)
2010-05-13 12:19 UTC, jessevdk@gmail.com
none Details | Review

Description Jaap A. Haitsma 2007-02-28 21:18:33 UTC
vi can display these. Would be cool if gedit could do this as well
Comment 1 Christian Kirbach 2007-02-28 21:25:18 UTC
what about file-roller?
Comment 2 Jaap A. Haitsma 2007-02-28 21:36:04 UTC
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
Comment 3 Christian Kirbach 2007-03-04 18:11:12 UTC
ah, not tar.gz ones, ok.

Paolo?
Comment 4 Thibaud 2007-04-27 19:35:36 UTC
Created attachment 87164 [details] [review]
Read gzipped file

Here is an attempt to detect and read gzipped files. It works only on local files.
Comment 5 Paolo Melchiorre 2008-07-09 08:10:48 UTC
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.
Comment 6 Paolo Melchiorre 2009-07-15 10:57:19 UTC
Can you add suppport for gzip, bip2 and xz ?
Comment 7 jessevdk@gmail.com 2010-05-10 12:52:47 UTC
*** Bug 618246 has been marked as a duplicate of this bug. ***
Comment 8 jessevdk@gmail.com 2010-05-13 12:13:24 UTC
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.
Comment 9 jessevdk@gmail.com 2010-05-13 12:19:03 UTC
Created attachment 160969 [details] [review]
Full file compression support

Patch from the compression branch. Implements full support for compressed files.
Comment 10 jessevdk@gmail.com 2010-05-16 16:24:11 UTC
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.
Comment 11 Jaap A. Haitsma 2010-05-23 07:47:37 UTC
Thanks for fixing this :-)