-
Notifications
You must be signed in to change notification settings - Fork 352
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: Support reading gzipped files #122
Comments
I'd like this for all archive files because in our company logs are attached to bug-reports as zip/7z archives and having to unpack them before opening is pain :) However, I don't see how this can be achived using current line indexing. |
Indeed, this is highly desirable and I have been thinking about how to do that for a while. Indexing is fine as you can stream the file whilst indexing. The problem is the display, which is done by reading a small, arbitrary part of the file, this is difficult to do on a compressed file unless the compressor as put some marking in it. But I'm still trying to find a solution (which is not to decompress the file fully in memory!!) |
Might I suggest this interface: If you push decompress, do nothing fancy other than unzip to tmp & open that in a new tab (Then popup an error if the tempdir write fails) Then all these concerns about random access and performance is sidestepped in favor of a one-click, sensible interface. Yes this will use disk space, but since it's by user request, it seems reasonable |
I would also vote for decompressing on the fly to a (configurable) temporary directory. On Linux lograte often times produces gzipped log files (no archive, just gzipped) - I think that's the reason zless / zgrep exist ;) |
Integrated to latest pre-release klogg build (20.1.0.562, see CI artifacts) a simple version of @jleaders suggestion. zip/7zip/tar.gz/tar.bz2/tar.xz are supported as well as gz/bz2/xz compressed files. Compression is determined by extension. Will use something like libmagic to actually look into file headers in next builds. Would appreciate any feedback. |
Thanks for your great work! Any hope for it merging down into glogg? |
There has been no activity in glogg repository since April 2018 :( That is one of the reasons my fork exists. If @nickbnf is still interested in developing glogg, I will be happy to contribute. If not then finding new maintainer for this great peace of software might be an option. |
GZip encoding can be detected on file open.
I realize this may be a performance hit, but it would be extremely helpful.
The text was updated successfully, but these errors were encountered: