1
2
3
4
5
6
7
8
9gd_encoding(3)                      GETDATA                     gd_encoding(3)
10
11
12

NAME

14       gd_encoding — report the binary encoding of data in a Dirfile
15
16

SYNOPSIS

18       #include <getdata.h>
19
20       unsigned long gd_encoding(DIRFILE *dirfile, int fragment_index);
21
22

DESCRIPTION

24       The  gd_encoding()  function queries a dirfile(5) database specified by
25       dirfile and returns the data  encoding  for  the  fragment  indexed  by
26       fragment_index.   The data encoding of a fragment indicate the encoding
27       of data files associated with RAW fields defined in the specified frag‐
28       ment.  The encoding of a fragment containing no RAW fields is ignored.
29
30

RETURN VALUE

32       Upon  successful  completion, gd_encoding() returns the binary encoding
33       of the specified fragment, which will one of the following symbols:
34
35              GD_UNENCODED, GD_BZIP2_ENCODED, GD_FLAC_ENCODED,
36              GD_GZIP_ENCODED, GD_LZMA_ENCODED, GD_SIE_ENCODED,
37              GD_SLIM_ENCODED, GD_TEXT_ENCODED, GD_ZZIP_ENCODED,
38              GD_ZZSLIM_ENCODED, GD_ENC_UNSUPPORTED.
39
40       If  the encoding scheme specified in the dirfile metadata is unknown to
41       GetData, GD_ENC_UNSUPPORTED  will  be  returned.   See  gd_open(3)  and
42       dirfile-encoding(5)  for  the meanings of the other symbols and details
43       on the supported encoding schemes.
44
45       On error, this function returns zero and stores a negative-valued error
46       code  in the DIRFILE object which may be retrieved by a subsequent call
47       to gd_error(3).  Possible error codes are:
48
49       GD_E_BAD_DIRFILE
50               The supplied dirfile was invalid.
51
52       GD_E_BAD_INDEX
53               The supplied index was out of range.
54
55       A descriptive error string for the error may  be  obtained  by  calling
56       gd_error_string(3).
57
58

HISTORY

60       The get_encoding() function appeared in GetData-0.5.0.
61
62       In GetData-0.7.0, this function was renamed to gd_encoding().
63
64

SEE ALSO

66       gd_alter_encoding(3),  gd_error(3),  gd_error_string(3), gd_getdata(3),
67       gd_open(3), dirfile(5), dirfile-encoding(5)
68
69
70
71Version 0.10.0                 25 December 2016                 gd_encoding(3)
Impressum