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 #define CRCCACHE_ENCODING "crcsync"
24 const char * ACCEPT_ENCODING_HEADER
= "Accept-Encoding";
25 const char * CAPABILITY_HEADER
= "Capability";
26 const char * ENCODING_HEADER
= "Content-Encoding";
27 const char * BLOCK_HEADER
= "If-Block";
28 const char * VARY_HEADER
= "Vary";
29 const char * VARY_VALUE
= "If-Block";
30 const char * ETAG_HEADER
= "ETag";
32 const int HASH_SIZE
=64; // bits per has, 30 bits is 5 bytes base 64
34 // HASH_SIZE_BYTES*FULL_BLOCK_COUNT*4/3 rounded up to the nearest multiple of 3
36 const int HASH_HEADER_SIZE
=427;
39 const unsigned char ENCODING_LITERAL
='L';
40 const unsigned char ENCODING_BLOCK
='B';
41 const unsigned char ENCODING_COMPRESSED
='Z';
42 const unsigned char ENCODING_HASH
='S';
44 const int ENCODING_COMPRESSED_HEADER_SIZE
= 1;// 1 byte indicator
45 const int ENCODING_LITERAL_HEADER_SIZE
= 1+4;// 1 byte indicator + 4 bytes length
46 const int ENCODING_BLOCK_HEADER_SIZE
= 1+1;// 1 byte indicator + 1 byte block
48 #endif /* CRCCACHE_H_ */