1MONGOC_URI_SET_COMPRESSORS(3)      libmongoc     MONGOC_URI_SET_COMPRESSORS(3)
2
3
4

SYNOPSIS

6          bool
7          mongoc_uri_set_compressors (mongoc_uri_t *uri, const char *compressors);
8

PARAMETERS

10uri: A mongoc_uri_t.
11
12compressors:  A  string consisting of one or more comma (,) separated
13         compressors (e.g. "snappy,zlib") or NULL. Passing NULL clears any ex‐
14         isting compressors set on uri.
15

DESCRIPTION

17       Sets  the  URI's  compressors,  after  the  URI  has been parsed from a
18       string.  Will overwrite any previously set value.
19

EXAMPLE

21          mongoc_client_t *client;
22          mongoc_uri_t *uri;
23
24          uri = mongoc_uri_new ("mongodb://localhost/");
25          mongoc_uri_set_compressors (uri, "snappy,zlib,zstd");
26          mongoc_client_new_from_uri (uri);
27          /* Snappy & zlib & zstd compressors are enabled */
28

RETURNS

30       Returns false if the option cannot be set, for example  if  compressors
31       is  not  valid UTF-8.  Logs a warning to stderr with the MONGOC_WARNING
32       macro if compressor is not available.
33

AUTHOR

35       MongoDB, Inc
36
38       2017-present, MongoDB, Inc
39
40
41
42
431.25.1                           Nov 08, 2023    MONGOC_URI_SET_COMPRESSORS(3)
Impressum