• R/O
  • HTTP
  • SSH
  • HTTPS

olha: Commit


Commit MetaInfo

Révision699d8b1698e27a34f80a08c702f234c33432771d (tree)
l'heure2008-06-24 23:20:57
AuteurKoji Arai <jca02266@gmai...>
CommiterKoji Arai

Message de Log

added comment for pbit and np

Change Summary

Modification

--- a/ar.c
+++ b/ar.c
@@ -57,6 +57,7 @@ Structure of archive block (low order byte first):
5757 struct lha_method methods[] = {
5858 /* id, dicbit, pbit, maxmatch */
5959 /* note: dicbit == 0 means no compress */
60+ /* (1U << pbit) > np(dicbit+1) */
6061 {"-lh0-", 0, 0, 0}, /* 0: no compress */
6162 {"-lh1-", 12, 0, 60}, /* 1: 2^12 = 4KB dynamic huffman (LHarc) */
6263 {"-lh2-", 13, 0,256}, /* 2: 2^13 = 8KB dynamic huffman */
--- a/ar.h
+++ b/ar.h
@@ -6,7 +6,7 @@
66 #include <limits.h>
77 #include <sys/types.h>
88
9-#define MAXDICBIT 16 /* 12(-lh4-) or 13(-lh5-) */
9+#define MAXDICBIT 16 /* 12(-lh4-), 13(-lh5-), 15(-lh6-), 16(-lh7-)*/
1010 #define MAXDICSIZ (1U << MAXDICBIT)
1111 #define MATCHBIT 8 /* bits for MAXMATCH - THRESHOLD */
1212 #define MAXMATCH 256 /* formerly F (not more than UCHAR_MAX + 1) */
@@ -17,9 +17,11 @@
1717 #define CBIT 9 /* $\lfloor \log_2 NC \rfloor + 1$ */
1818 #define CODE_BIT 16 /* codeword length */
1919
20-#define NP (MAXDICBIT + 1)
20+#define NP (MAXDICBIT + 1) /* max value of np */
2121 #define NT (CODE_BIT + 3)
22+#if 0 /* Use the pbit variable instead of PBIT */
2223 #define PBIT 4 /* smallest integer such that (1U << PBIT) > NP */
24+#endif
2325 #define TBIT 5 /* smallest integer such that (1U << TBIT) > NT */
2426
2527 typedef unsigned char uchar; /* 8 bits or more */
Afficher sur ancien navigateur de dépôt.