1MONGOC_URI_GET_COMPRESSORS(3) libmongoc MONGOC_URI_GET_COMPRESSORS(3)
2
3
4
6 mongoc_uri_get_compressors - mongoc_uri_get_compressors()
7
9 const bson_t *
10 mongoc_uri_get_compressors (const mongoc_uri_t *uri);
11
13 • uri: A mongoc_uri_t.
14
16 Returns a bson document with the enabled compressors as the keys or an
17 empty document if no compressors were provided.
18
20 mongoc_client_t *client;
21 mongoc_uri_t *uri;
22
23 uri = mongoc_uri_new ("mongodb://localhost/?compressors=zlib,snappy,zstd");
24
25 if (bson_has_field (mongoc_uri_get_compressors (uri), "snappy")) {
26 /* snappy enabled */
27 }
28
30 A bson_t * which should not be modified or freed.
31
33 MongoDB, Inc
34
36 2017-present, MongoDB, Inc
37
38
39
40
411.21.1 Mar 02, 2022 MONGOC_URI_GET_COMPRESSORS(3)