libdap  Updated for version 3.20.6
libdap4 is an implementation of OPeNDAP's DAP protocol.
chunked_stream.h
1 /*
2  * chunked_stream.h
3  *
4  * Created on: Sep 15, 2013
5  * Author: jimg
6  */
7 
8 #ifndef CHUNK_STREAM_H_
9 #define CHUNK_STREAM_H_
10 
11 // These are the three chunk types
12 #define CHUNK_DATA 0x00000000
13 #define CHUNK_END 0x01000000
14 #define CHUNK_ERR 0x02000000
15 
16 // This is the bit in the chunk that indicates the byte-order of the data,
17 // not the byte order of the chunk. The chunk is always in network byte order.
18 #define CHUNK_LITTLE_ENDIAN 0x04000000
19 
20 // Chunk type mask masks off the low bytes and the little endian bit.
21 // The three chunk types (DATA, END and ERR) are mutually exclusive.
22 #define CHUNK_TYPE_MASK 0x03000000
23 #define CHUNK_SIZE_MASK 0x00FFFFFF
24 
25 #define CHUNK_SIZE 4096
26 
27 #define BYTE_ORDER_PREFIX 0
28 #define HEADER_IN_NETWORK_BYTE_ORDER 1
29 
30 #endif /* CHUNK_STREAM_H_ */