1get_encoding(3)                     GETDATA                    get_encoding(3)
2
3
4

NAME

6       get_encoding — report the binary encoding of data in a dirfile
7

SYNOPSIS

9       #include <getdata.h>
10
11       unsigned long get_encoding(DIRFILE *dirfile, int fragment_index);
12

DESCRIPTION

14       The  get_encoding() function queries a dirfile(5) database specified by
15       dirfile and returns the binary encoding for  the  fragment  indexed  by
16       fragment_index.   The binary encoding of a fragment indicate the encod‐
17       ing of data stored in binary files associated with RAW  fields  defined
18       in  the  specified  fragment.  The encoding of a fragment containing no
19       RAW fields is ignored.
20
21

RETURN VALUE

23       Upon successful completion, get_encoding() returns the binary  encoding
24       of the specified fragment, which will one of the following symbols:
25
26              GD_UNENCODED, GD_TEXT_ENCODED, GD_SLIM_ENCODED,
27              GD_GZIP_ENCODED, GD_BZIP2_ENCODED, GD_LZMA_ENCODED,
28              GD_ENC_UNSUPPORTED.
29
30       See dirfile_cbopen(3) and dirfile-encoding(5) for the meanings of these
31       symbols and details on the supported encoding schemes.  If the encoding
32       scheme  specified  in  the  dirfile  metadata  is  unknown  to GetData,
33       GD_ENC_UNSUPPORTED will be returned.
34
35       On error, it returns zero and sets the dirfile error to a non-zero  er‐
36       ror value.  Possible error values are:
37
38       GD_E_BAD_DIRFILE
39               The supplied dirfile was invalid.
40
41       GD_E_BAD_INDEX
42               The supplied index was out of range.
43
44       The dirfile error may be retrieved by calling get_error(3).  A descrip‐
45       tive error string for the last error encountered can be obtained from a
46       call to get_error_string(3).
47

SEE ALSO

49       dirfile_alter_encoding(3),  dirfile_open(3),  getdata(3), get_error(3),
50       get_error_string(3), dirfile(5), dirfile-format(5)
51
52
53
54Version 0.6.0                   4 October 2009                 get_encoding(3)
Impressum