Method: Mongo::Protocol::Message#maybe_compress
- Defined in:
- lib/mongo/protocol/message.rb
#maybe_compress(compressor, zlib_compression_level = nil) ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Compress the message, if supported by the wire protocol used and if the command being sent permits compression. Otherwise returns self.
112 113 114 |
# File 'lib/mongo/protocol/message.rb', line 112 def maybe_compress(compressor, zlib_compression_level = nil) self end |