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

NAME

6       mongoc_uri_set_compressors - mongoc_uri_set_compressors()
7

SYNOPSIS

9          bool
10          mongoc_uri_set_compressors (mongoc_uri_t *uri, const char *compressors);
11

PARAMETERS

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

DESCRIPTION

20       Sets  the  URI's  compressors,  after  the  URI  has been parsed from a
21       string.  Will overwrite any previously set value.
22

EXAMPLE

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

RETURNS

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

AUTHOR

38       MongoDB, Inc
39
41       2017-present, MongoDB, Inc
42
43
44
45
461.23.1                           Oct 20, 2022    MONGOC_URI_SET_COMPRESSORS(3)
Impressum