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

NAME

14       gd_encoding_support — determine GetData library support for data encod‐
15       ings
16
17

SYNOPSIS

19       #include <getdata.h>
20
21       int gd_encoding_support(unsigned long encoding);
22
23

DESCRIPTION

25       The gd_encoding_support() function reports whether the Dirfile encoding
26       specified  by  encoding  is  supported  by  the  GetData  library.  The
27       encoding argument should be one of the  following  symbols,  indicating
28       the encoding type:
29
30              GD_UNENCODED, GD_BZIP2_ENCODED, GD_FLAC_ENCODED,
31              GD_GZIP_ENCODED, GD_LZMA_ENCODED, GD_SIE_ENCODED,
32              GD_SLIM_ENCODED, GD_TEXT_ENCODED, GD_ZZIP_ENCODED,
33              GD_ZZSLIM_ENCODED.
34
35       See gd_open(3) and dirfile-encoding(5) for the meanings of  these  sym‐
36       bols and details on the known encoding schemes.
37
38

RETURN VALUE

40       The  function  gd_encoding_support() returns GD_RDWR if the GetData li‐
41       brary can read from and write to the specified encoding,  GD_RDONLY  if
42       the GetData library can only read from the specified encoding, or -1 if
43       neither reading nor writing is supported, or if encoding was not one of
44       the symbols listed above.
45
46

NOTES

48       GetData's  encoding  support  framework is more finely grained than the
49       three-way system reported by this function.  It is possible for the li‐
50       brary  to  have partial support for reading or writing a particular en‐
51       coding.  This function will only report positive support if  all  func‐
52       tions of a given class (read-only or read-write) are supported.
53
54       Furthermore,  encoding  types can have multiple subtypes with different
55       degrees of support.  This function reports the support of the most sup‐
56       ported subtype.  For example, the LZMA encoding framework can read both
57       the .lzma and .xz container formats, but only write .xz files.  If LZMA
58       support  is  available,  this  function will return GD_RDWR when passed
59       GD_LZMA_ENCODED.
60
61

HISTORY

63       The gd_encoding_support() function appeared in GetData-0.9.0.
64
65

SEE ALSO

67       gd_encoding(3), gd_open(3), dirfile-encoding(5)
68
69
70
71Version 0.10.0                 25 December 2016         gd_encoding_support(3)
Impressum