message: more efficient getBlobSize()
diff: @@ -9,7 +9,6 @@ import {
  IsoBuffer,
  Uint8ArrayToString,
  unreachableCase,
  - stringToBuffer,
  } from "@fluidframework/common-utils";
  import { AttachmentTreeEntry, BlobTreeEntry, TreeTreeEntry } from "@fluidframework/protocol-base";
  import {
  @@ -45,9 +44,26 @@ export function mergeStats(...stats: ISummaryStats[]): ISummaryStats {
  return results;
  }
  +export function utf8ByteLength(str: string): number {
  + // returns the byte length of an utf8 string
  + let s = str.length;
  + for (let i = str.length - 1; i >= 0; i--) {
  + const code = str.charCodeAt(i);
  + if (code > 0x7f && code <= 0x7ff) {
  + s++;
  + } else if (code > 0x7ff && code <= 0xffff) {
  + s += 2;
  + }
  + if (code >= 0xDC00 && code <= 0xDFFF) {
  + i--; // trail surrogate
  + }
  + }
  + return s;
  +}
  +
  export function getBlobSize(content: ISummaryBlob["content"]): number {
  if (typeof content === "string") {
  - return stringToBuffer(content, "utf8").byteLength;
  + return utf8ByteLength(content);
  } else {
  return content.byteLength;
  }
  