4 * Common files for crccache client and server apache modules
6 * Created on: 21/02/2009
8 * Contributor: Alex Wulms
17 #define MAX(a,b) ((a) > (b) ? (a) : (b))
20 #define MIN(a,b) ((a) < (b) ? (a) : (b))
23 const char * CRCCACHE_ENCODING
= "crcsync";
24 const char * ENCODING_HEADER
= "Content-Encoding";
25 const char * BLOCK_HEADER
= "If-Block";
26 const char * VARY_HEADER
= "Vary";
27 const char * VARY_VALUE
= "If-Block";
29 #define FULL_BLOCK_COUNT 40
30 const int HASH_SIZE
=64; // bits per has, 30 bits is 5 bytes base 64
32 // HASH_SIZE_BYTES*(FULL_BLOCK_COUNT+1)*4/3 rounded up to the nearest multiple of 3
34 const int HASH_HEADER_SIZE
=438;
37 const unsigned char ENCODING_LITERAL
='L';
38 const unsigned char ENCODING_BLOCK
='B';
39 const unsigned char ENCODING_COMPRESSED
='Z';
40 const unsigned char ENCODING_HASH
='S';
42 const int ENCODING_COMPRESSED_HEADER_SIZE
= 1;// 1 byte indicator
43 const int ENCODING_LITERAL_HEADER_SIZE
= 1+4;// 1 byte indicator + 4 bytes length
44 const int ENCODING_BLOCK_HEADER_SIZE
= 1+1;// 1 byte indicator + 1 byte block
46 #endif /* CRCCACHE_H_ */