Sha256: b39d105289d96abec64f9c049eb9b64b7831348bb2b3d4937ec2b6f32b99c26d
Contents?: true
Size: 404 Bytes
Versions: 7
Compression:
Stored size: 404 Bytes
Contents
# A thin wrapper for the CBson class class BSON_C def self.serialize(obj, check_keys=false, move_id=false) ByteBuffer.new(CBson.serialize(obj, check_keys, move_id)) end def self.deserialize(buf=nil) if buf.is_a? String to_deserialize = ByteBuffer.new(buf) if buf else buf = ByteBuffer.new(buf.to_a) if buf end buf.rewind CBson.deserialize(buf.to_s) end end
Version data entries
7 entries across 7 versions & 2 rubygems