1MONGOC_URI_SET_COMPRESSORS(3) MongoDB C Driver MONGOC_URI_SET_COMPRESSORS(3)
2
3
4
6 mongoc_uri_set_compressors - mongoc_uri_set_compressors()
7
9 bool
10 mongoc_uri_set_compressors (mongoc_uri_t *uri, const char *compressors);
11
13 · uri: A mongoc_uri_t.
14
15 · compressors: One or more comma (,) separated compressors.
16
18 Sets the URI's compressors, after the URI has been parsed from a
19 string. Will overwrite any previously set value.
20
22 mongoc_client_t *client;
23 mongoc_uri_t *uri;
24
25 uri = mongoc_uri_new ("mongodb://localhost/");
26 mongoc_uri_set_compressors (uri, "snappy,zlib");
27 mongoc_client_new_from_uri (uri);
28 /* Snappy & zlib compressors are enabled */
29
31 Returns false if the option cannot be set, for example if compressors
32 is not valid UTF-8. Logs a warning to stderr with the MONGOC_WARNING
33 macro if compressor is not available.
34
36 MongoDB, Inc
37
39 2017-present, MongoDB, Inc
40
41
42
43
441.13.1 Jan 24, 2019 MONGOC_URI_SET_COMPRESSORS(3)