Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Heatshrink
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grant Kim
Heatshrink
Commits
ed69894a
Commit
ed69894a
authored
10 years ago
by
Scott Vokes
Browse files
Options
Downloads
Patches
Plain Diff
Add usage details, homepage to `heatshrink -h` message.
parent
8b25f90a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
heatshrink.c
+31
-1
31 additions, 1 deletion
heatshrink.c
heatshrink_common.h
+1
-0
1 addition, 0 deletions
heatshrink_common.h
with
32 additions
and
1 deletion
heatshrink.c
+
31
−
1
View file @
ed69894a
...
...
@@ -25,11 +25,41 @@ static const int version_major = HEATSHRINK_VERSION_MAJOR;
static
const
int
version_minor
=
HEATSHRINK_VERSION_MINOR
;
static
const
int
version_patch
=
HEATSHRINK_VERSION_PATCH
;
static
const
char
author
[]
=
HEATSHRINK_AUTHOR
;
static
const
char
url
[]
=
HEATSHRINK_URL
;
static
void
usage
(
void
)
{
fprintf
(
stderr
,
"heatshrink version %u.%u.%u by %s
\n
"
,
version_major
,
version_minor
,
version_patch
,
author
);
fprintf
(
stderr
,
"usage: heatshrink [-h] [-e|-d] [-v] [-w BITS] [-l BITS] [IN_FILE] [OUT_FILE]
\n
"
);
fprintf
(
stderr
,
"Home page: %s
\n\n
"
,
url
);
fprintf
(
stderr
,
"Usage:
\n
"
" heatshrink [-h] [-e|-d] [-v] [-w SIZE] [-l BITS] [IN_FILE] [OUT_FILE]
\n
"
"
\n
"
"heatshrink compresses or uncompresses byte streams using LZSS, and is
\n
"
"designed especially for embedded, low-memory, and/or hard real-time
\n
"
"systems.
\n
"
"
\n
"
" -h print help
\n
"
" -e encode (compress)
\n
"
" -d decode (uncompress)
\n
"
" -v verbose (print input & output sizes, compression ratio, etc.)
\n
"
"
\n
"
" -w SIZE Base-2 log of LZSS sliding window size
\n
"
"
\n
"
" A larger value allows searches a larger history of the data for repeated
\n
"
" patterns, potentially compressing more effectively, but will use
\n
"
" more memory and processing time.
\n
"
" Recommended default: -w 8 (embedded systems), -w 10 (elsewhere)
\n
"
"
\n
"
" -l BITS Number of bits used for back-reference lengths
\n
"
"
\n
"
" A larger value allows longer substitutions, but since all
\n
"
" back-references must use -w + -l bits, larger -w or -l can be
\n
"
" counterproductive if most patterns are small and/or local.
\n
"
" Recommended default: -l 4
\n
"
"
\n
"
" If IN_FILE or OUT_FILE are unspecified, they will default to
\n
"
"
\"
-
\"
for standard input and standard output, respectively.
\n
"
);
exit
(
1
);
}
...
...
This diff is collapsed.
Click to expand it.
heatshrink_common.h
+
1
−
0
View file @
ed69894a
...
...
@@ -2,6 +2,7 @@
#define HEATSHRINK_H
#define HEATSHRINK_AUTHOR "Scott Vokes <scott.vokes@atomicobject.com>"
#define HEATSHRINK_URL "https://github.com/atomicobject/heatshrink"
/* Version 0.3.0 */
#define HEATSHRINK_VERSION_MAJOR 0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment