diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:23:38 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:23:38 -0700 |
commit | f0e76a6634eb26e3ddc6dfc6f2489553eff8c8f4 (patch) | |
tree | 8bf5aaebe407006d34a13ae68659e85e1b55504f /contrib/puff/puff.c | |
parent | 7a33a861d1526894272a8a4b08527ce32316d750 (diff) | |
download | zlib-1.2.1.1.tar.gz zlib-1.2.1.1.tar.bz2 zlib-1.2.1.1.zip |
zlib 1.2.1.1v1.2.1.1
Diffstat (limited to 'contrib/puff/puff.c')
-rw-r--r-- | contrib/puff/puff.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/puff/puff.c b/contrib/puff/puff.c index 7a8116b..ce0cc40 100644 --- a/contrib/puff/puff.c +++ b/contrib/puff/puff.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * puff.c | 2 | * puff.c |
3 | * Copyright (C) 2002, 2003 Mark Adler | 3 | * Copyright (C) 2002-2004 Mark Adler |
4 | * For conditions of distribution and use, see copyright notice in puff.h | 4 | * For conditions of distribution and use, see copyright notice in puff.h |
5 | * version 1.7, 3 Mar 2003 | 5 | * version 1.8, 9 Jan 2004 |
6 | * | 6 | * |
7 | * puff.c is a simple inflate written to be an unambiguous way to specify the | 7 | * puff.c is a simple inflate written to be an unambiguous way to specify the |
8 | * deflate format. It is not written for speed but rather simplicity. As a | 8 | * deflate format. It is not written for speed but rather simplicity. As a |
@@ -60,6 +60,7 @@ | |||
60 | * 1.6 7 Aug 2002 - Minor format changes | 60 | * 1.6 7 Aug 2002 - Minor format changes |
61 | * 1.7 3 Mar 2003 - Added test code for distribution | 61 | * 1.7 3 Mar 2003 - Added test code for distribution |
62 | * - Added zlib-like license | 62 | * - Added zlib-like license |
63 | * 1.8 9 Jan 2004 - Added some comments on no distance codes case | ||
63 | */ | 64 | */ |
64 | 65 | ||
65 | #include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */ | 66 | #include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */ |
@@ -577,6 +578,9 @@ local int fixed(struct state *s) | |||
577 | * block is fewer bits), but it is allowed by the format. So incomplete | 578 | * block is fewer bits), but it is allowed by the format. So incomplete |
578 | * literal/length codes of one symbol should also be permitted. | 579 | * literal/length codes of one symbol should also be permitted. |
579 | * | 580 | * |
581 | * - If there are only literal codes and no lengths, then there are no distance | ||
582 | * codes. This is represented by one distance code with zero bits. | ||
583 | * | ||
580 | * - The list of up to 286 length/literal lengths and up to 30 distance lengths | 584 | * - The list of up to 286 length/literal lengths and up to 30 distance lengths |
581 | * are themselves compressed using Huffman codes and run-length encoding. In | 585 | * are themselves compressed using Huffman codes and run-length encoding. In |
582 | * the list of code lengths, a 0 symbol means no code, a 1..15 symbol means | 586 | * the list of code lengths, a 0 symbol means no code, a 1..15 symbol means |