Method: Mongo::Protocol::Compressed#maybe_inflate
- Defined in:
- lib/mongo/protocol/compressed.rb
#maybe_inflate ⇒ Protocol::Message
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.
Inflates an OP_COMRESSED message and returns the original message.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/mongo/protocol/compressed.rb', line 95 def maybe_inflate = Registry.get(@original_op_code).allocate buf = decompress() .send(:fields).each do |field| if field[:multi] Message.deserialize_array(, buf, field) else Message.deserialize_field(, buf, field) end end if .is_a?(Msg) .fix_after_deserialization end end |