-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
create 'brot' command-line compression program #163
Conversation
'brot' supports the same common usage as gzip/bzip2/xz . add two test scripts: * brot-test.sh compares behaviour with gzip/bzip2/xz * brot-size-test.sh compares compression sizes with gzip/bzip2/xz
I feel like there's a better name that could be used. I do like |
I think the existing |
@khaledhosny I think you mean |
We decided to change the interface of the bro tool to match gzip. Would you be willing to change bro.cc with these changes to the command line parsing? For easier review, it could be broken up into multiple pull requests, e.g. as a first step factor out the function that processes one file from main(). As for function naming and other style conventions, please see https://google-styleguide.googlecode.com/svn/trunk/cppguide.html And in order to accept your contributions, you have to sign a CLA (see https://github.com/google/brotli/blob/master/CONTRIBUTING) |
That would be great! BTW shouldn't --best be an alias for -11 instead of -9? That will probably be a bit more complex to handle since -11 is not a short option anymore, though. |
If the brotli command line program is available (as used in the pre-release Debian package[1]), use it to precompress text files and serve these files with the br encoding (as accepted by Firefox 44 and later). Use the .bro extension, as used in the current pull request for a proper command-line program.[2] 1. https://anonscm.debian.org/cgit/collab-maint/brotli.git/ 2. google/brotli#163 Signed-off-by: Kevin Locke <[email protected]>
#define BUGREPORT "[email protected]" | ||
|
||
/* File extensions for brotli files */ | ||
#define EXTENSION ".bro" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was changed to .br
.
break; | ||
|
||
case 'd': | ||
opmode = DECOMPRESS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be allow only one of c
or d
. Exit with an error when both are provided.
Let the default value of opmode
be UNKNOWN
with:
typedef struct _opmode {
BROT_MODE_UNKNOWN,
BROT_MODE_COMPRESS,
BROT_MODE_DECOMPRESS
} opmode;
case 'c': {
if (opmode != BROT_MODE_UNKNOWN) {
exit_with_error(some-code);
}
proceed-with-compression
}
Any chance to get this merged? |
Please Please Please merge it |
To anyone following this topic (the 'brot' stand-alone compression) program: I haven't been keeping track of brotli since I wrote this - but if anyone is interested in picking it up and making it work - they have my full support. If there are minor changes that I can help with - let me know. |
Soon I will be landing next brotli update. Among other things it contains new CLI... |
'brot' supports the same common usage as gzip/bzip2/xz .
add two test scripts:
(could be renamed to 'bro', but I didn't want to override the current 'bro' program).