deserialize static method

BsonSerializable deserialize(
  1. BsonBinary buffer
)

Implementation

static BsonSerializable deserialize(BsonBinary buffer) {
  if (buffer.byteList.length < 5) {
    throw Exception('corrupted bson message < 5 bytes long');
  }
  buffer.offset = 0;
  return BsonCustom.fromBuffer(buffer).value;
}