mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
brtotli command line tool: list option #258
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @stokito on GitHub (Oct 27, 2018).
gzip tool provides an option to list the archive contents:
This is useful for archive managers like engrampa to let us known the uncompressed size.
For example if archiver doesn't support the list function then it needs for a workaround:
https://github.com/mate-desktop/engrampa/blob/master/src/fr-command-cfile.c#L158
Could you implement the similar option?
@eustas commented on GitHub (Nov 1, 2018):
Surely, but a little bit later.
@stokito commented on GitHub (Nov 1, 2018):
I tested gzip recently and it turned out few moments that might be interesting for you:
--listreturns original size, compress ratio in % anduncompressed_namewhich is in fact not and original file name but the same name of the archive just without.gz.This is very inconvenient because, for example, archive manager can't determine an original file name and it needs for parsing the gz file itself.
I think this is a bug and I should send a letter to gzip team but anyway please don't do the same for brotli.
--list --quietdo not returns headers. This simplifies a little bit parsing of the output by archive manager.To get an original modify time of the gziped file we need to call gzip --list --verbose because only with this option it shows date and time column:
And the parsing of those two columns is not convenient: it shows date as "Jul 17" (no matter which locale on your system) and time in separate column. I think this is good that it doesn't localize time but just regular ISO datetime would be easier to parse. Another problem is that splitting columns just by space
is not working anymore. The same problem for last columnuncompressed_name: it can contain spaces and this makes a parsing trickier.@eustas commented on GitHub (Nov 1, 2018):
Brotli is a "stream" format, so it does not keep original filename & modification time (unlike gzip).
Future "brotli-framing-format" allows storing this metadata + other cool stuff.
@eustas commented on GitHub (Jul 18, 2019):
Lets postpone until https://datatracker.ietf.org/doc/draft-vandevenne-shared-brotli-format/