Debian Codegraph @

converter/pbm/g3.h

raw
1 /* G3 fax format declarations */
2
3 #ifndef G3_H_INCLUDED
4 #define G3_H_INCLUDED
5
6 /* G3 is nearly universal as the format for fax transmissions in the
7 US. Its full name is CCITT Group 3 (G3). It is specified in
8 Recommendations T.4 and T.30 and in EIA Standards EIA-465 and
9 EIA-466. It dates to 1993.
10
11 G3 faxes are 204 dots per inch (dpi) horizontally and 98 dpi (196
12 dpi optionally, in fine-detail mode) vertically. Since G3 neither
13 assumes error free transmission nor retransmits when errors occur,
14 the encoding scheme used is differential only over small segments
15 never exceeding 2 lines at standard resolution or 4 lines for
16 fine-detail. (The incremental G3 encoding scheme is called
17 two-dimensional and the number of lines so encoded is specified by
18 a parameter called k.)
19
20 G3 specifies much more than the format of the bit stream, which is
21 the subject of this header file. It also specifies layers
22 underneath the bit stream.
23
24 There is also the newer G4.
25 */
26 #include "pm_config.h" /* uint32_t */
27
28 struct BitString {
29 /* A string of bits, up to as many fit in 32 bits. */
30 uint32_t intBuffer;
31 /* The bits are in the 'bitCount' least significant bit positions
32 of this number. The rest of the bits of this number are always
33 zero.
34 */
35 unsigned int bitCount;
36 /* The length of the bit string */
37
38 /* Example: The bit string 010100 would be represented by
39 bitCount = 6, intBuffer = 20
40 (N.B. 20 = 00000000 00000000 00000000 00010100 in binary)
41 */
42 };
43
44 #endif