File: chunked_stream.h

package info (click to toggle)
libdap 3.20.7-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 24,448 kB
  • sloc: cpp: 52,490; sh: 40,745; xml: 23,511; ansic: 20,030; yacc: 2,520; exp: 1,544; makefile: 1,057; lex: 309; perl: 52; fortran: 8
file content (30 lines) | stat: -rw-r--r-- 783 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * chunked_stream.h
 *
 *  Created on: Sep 15, 2013
 *      Author: jimg
 */

#ifndef CHUNK_STREAM_H_
#define CHUNK_STREAM_H_

// These are the three chunk types
#define CHUNK_DATA 0x00000000
#define CHUNK_END  0x01000000
#define CHUNK_ERR  0x02000000

// This is the bit in the chunk that indicates the byte-order of the data,
// not the byte order of the chunk. The chunk is always in network byte order.
#define CHUNK_LITTLE_ENDIAN  0x04000000

// Chunk type mask masks off the low bytes and the little endian bit.
// The three chunk types (DATA, END and ERR) are mutually exclusive.
#define CHUNK_TYPE_MASK 0x03000000
#define CHUNK_SIZE_MASK 0x00FFFFFF

#define CHUNK_SIZE 4096

#define BYTE_ORDER_PREFIX 0
#define HEADER_IN_NETWORK_BYTE_ORDER 1

#endif /* CHUNK_STREAM_H_ */