File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -574,12 +574,18 @@ The driver supports two compressors
574
574
* zlib, which is supported by Erlang
575
575
* zstd, which is optional and supported by https://github.com/silviucpp/ezstd bindings.
576
576
577
- To activate zstd compression, simply add ` {:ezstd, "~> 1.1"} ` to the dependencies of your ` mix.exs ` file.
578
- The driver will provide the related code. After activating the zstd compressor can be used by appending
579
- the ` compressors=zstd ` to the URL connection string:
577
+ To activate zlib compression:
578
+ 1 . Append ` compressors=zlib ` to the URL connection string:
579
+ ``` elixir
580
+ {:ok , top} = Mongo .start_link (url: " mongodb://localhost:27017/db?compressors=zlib" )
581
+ ```
582
+
583
+ To activate zstd compression:
584
+ 1 . Add ` {:ezstd, "~> 1.1"} ` to the dependencies of your ` mix.exs ` file. The driver will provide the related code.
585
+ 2 . Append ` compressors=zstd ` to the URL connection string:
580
586
581
587
``` elixir
582
- {:ok , top} = Mongo .start_link (url: " mongodb://localhost:27017/my_database ?compressors=zstd&maxPoolSize=10 " )
588
+ {:ok , top} = Mongo .start_link (url: " mongodb://localhost:27017/db ?compressors=zstd" )
583
589
```
584
590
585
591
The driver uses compression for the following functions:
You can’t perform that action at this time.
0 commit comments