extractData static method

Map<String, dynamic> extractData(
  1. BsonBinary buffer
)

Implementation

static Map<String, dynamic> extractData(BsonBinary buffer) {
  var ret = <String, dynamic>{};
  buffer.offset += 4;
  var typeByte = buffer.readByte();
  while (typeByte != 0) {
    var key = buffer.readCString();
    ret[key] = BsonObject.fromTypeByteAndBuffer(typeByte, buffer).value;
    typeByte = buffer.readByte();
  }
  return ret;
}