ZStandard Compression not working in MongoDB v4.2.7

The collection was created after I edited the config but I was setting the Network compression instead of block compression as you explained in your reply.

I used CreateCollectionOptions class as suggested and it worked! :slight_smile:
This is the C# code in case anyone needs it later on:

           IMongoDatabase testdb = client.GetDatabase("testdb");

           testdb.CreateCollection("Hamsters", new CreateCollectionOptions()
           {
               StorageEngine = new BsonDocument {
                   { "wiredTiger", new BsonDocument {
                       {  "configString" , "block_compressor=zstd"  }
                   } }
               }
           });```

Thank you
2 Likes