Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
962ba9ae
Commit
962ba9ae
authored
Dec 13, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a discussion of the parser's set_group_name() method.
parent
251266dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
compress_stream_ex.cpp
examples/compress_stream_ex.cpp
+12
-3
No files found.
examples/compress_stream_ex.cpp
View file @
962ba9ae
...
...
@@ -13,13 +13,16 @@
Options:
-c Indicates that we want to compress a file.
-d Indicates that we want to decompress a file.
-h Display this help message.
--in <arg> This option takes one argument which specifies the name of the
file we want to compress/decompress.
-l <arg> Set the compression level [1-3], 3 is max compression, default
is 2.
--out <arg> This option takes one argument which specifies the name of the
output file.
Miscellaneous Options:
-h Display this help message.
-l <arg> Set the compression level [1-3], 3 is max compression, default
is 2.
*/
...
...
@@ -55,6 +58,12 @@ int main(int argc, char** argv)
parser
.
add_option
(
"in"
,
"This option takes one argument which specifies the name of the file we want to compress/decompress."
,
1
);
// add a --out option that takes 1 argument
parser
.
add_option
(
"out"
,
"This option takes one argument which specifies the name of the output file."
,
1
);
// In the code below, we use the parser.print_options() method to print all our
// options to the screen. We can tell it that we would like some options to be
// grouped together by calling set_group_name() before adding those options. In
// general, you can make as many groups as you like by calling set_group_name().
// However, here we make only one named group.
parser
.
set_group_name
(
"Miscellaneous Options"
);
parser
.
add_option
(
"h"
,
"Display this help message."
);
parser
.
add_option
(
"l"
,
"Set the compression level [1-3], 3 is max compression, default is 2."
,
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment