Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Transparently edit gzip'ed files #208

Open
TinoDidriksen opened this issue Mar 25, 2021 · 3 comments
Open

[Feature Request] Transparently edit gzip'ed files #208

TinoDidriksen opened this issue Mar 25, 2021 · 3 comments
Assignees
Labels
soon Something that will happen soon

Comments

@TinoDidriksen
Copy link

One of the really neat things jEdit and mcedit do, is allow transparent editing of gzip'ed files. They can open, edit, and save e.g. .xml.gz files and the user never needs to worry about the compression. In the case of mcedit, it can even handle .bz2 and .xz and others.

Please add similar transparent handling of compressed files to SEE.

@monkeydom monkeydom added the soon Something that will happen soon label Mar 25, 2021
@monkeydom monkeydom self-assigned this Mar 25, 2021
@monkeydom
Copy link
Contributor

Sounds like an interesting request. How did jEdit and mcedit choose the compression level? I personally would not like it to have a short edit blow up the file size significantly.

@TinoDidriksen
Copy link
Author

Good question - answer is apparently that they don't.

mcedit pipes through cmdline tools with default options: https://github.com/MidnightCommander/mc/blob/master/src/editor/edit.c#L127-L134

jEdit uses Java's GZIPOutputStream https://sourceforge.net/p/jedit/svn/HEAD/tree/jEdit/trunk/org/gjt/sp/jedit/bufferio/BufferSaveRequest.java#l200 which doesn't even look capable of taking a compression level.

@fourplusone
Copy link
Collaborator

In case of gzip, there’s a hint in the header

XFL (eXtra FLags)
            These flags are available for use by specific compression
            methods.  The "deflate" method (CM = 8) sets these flags as
            follows:

               XFL = 2 - compressor used maximum compression,
                         slowest algorithm
               XFL = 4 - compressor used fastest algorithm```

https://tools.ietf.org/html/rfc1952.html#section-2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
soon Something that will happen soon
Projects
None yet
Development

No branches or pull requests

3 participants