summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:27:17 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:27:17 -0700
commite0ff940e1adb68d3575705ebf1546d9f07ad3b4a (patch)
tree792ac6996d1225c0955027050296126bc8ff6e26 /examples
parent7df877eccdd826e94df53215f65dee639428e83f (diff)
downloadzlib-e0ff940e1adb68d3575705ebf1546d9f07ad3b4a.tar.gz
zlib 1.2.3.8v1.2.3.8
Diffstat (limited to 'examples')
-rw-r--r--examples/enough.c16
-rw-r--r--examples/gzlog.c2
2 files changed, 9 insertions, 9 deletions
diff --git a/examples/enough.c b/examples/enough.c
index b570707..c40410b 100644
--- a/examples/enough.c
+++ b/examples/enough.c
@@ -141,7 +141,7 @@ struct tab { /* type for been here check */
For the deflate example of 286 symbols limited to 15-bit codes, the array
has 284,284 entries, taking up 2.17 MB for an 8-byte big_t. More than
half of the space allocated for saved results is actually used -- not all
- possible triplets are reached in the generation of valid Huffman codes.
+ possible triplets are reached in the generation of valid Huffman codes.
*/
/* The array for tracking visited states, done[], is itself indexed identically
@@ -466,19 +466,19 @@ int main(int argc, char **argv)
/* get arguments -- default to the deflate literal/length code */
syms = 286;
- root = 9;
+ root = 9;
max = 15;
if (argc > 1) {
syms = atoi(argv[1]);
if (argc > 2) {
root = atoi(argv[2]);
- if (argc > 3)
- max = atoi(argv[3]);
- }
+ if (argc > 3)
+ max = atoi(argv[3]);
+ }
}
if (argc > 4 || syms < 2 || root < 1 || max < 1) {
fputs("invalid arguments, need: [sym >= 2 [root >= 1 [max >= 1]]]\n",
- stderr);
+ stderr);
return 1;
}
@@ -556,8 +556,8 @@ int main(int argc, char **argv)
}
/* find and show maximum inflate table usage */
- if (root > max) /* reduce root to max length */
- root = max;
+ if (root > max) /* reduce root to max length */
+ root = max;
if (syms < ((code_t)1 << (root + 1)))
enough(syms);
else
diff --git a/examples/gzlog.c b/examples/gzlog.c
index 4daf1c2..d70aaca 100644
--- a/examples/gzlog.c
+++ b/examples/gzlog.c
@@ -62,7 +62,7 @@
compressed data, and contains both the crc and length of just the compressed
data and of the complete set of data including the contents of the foo.add
file.
-
+
Again, the foo.add file is maintained during the compress operation in case
of an interruption. If in the unlikely event the foo.add file with the data
to be compressed is missing due to some external force, a gzip file with