public static BinlogStats Calculate(string binlogFilePath) { var stats = new BinlogStats(); var reader = new BinLogReader(); reader.OnBlobRead += (kind, bytes) => stats.OnBlobRead(kind, bytes); reader.OnStringRead += (text, lengthBytes) => stats.OnStringRead(text, lengthBytes); reader.OnNameValueListRead += (list, recordLengthBytes) => stats.OnNameValueListRead(list, recordLengthBytes); var records = reader.ReadRecords(binlogFilePath); stats.Process(records); return(stats); }