Calculating size of Google Firestore documents
问题 Firestore docs give details of how to manually calculate the stored size of a document, but there does not seem to be a function provided for this on any of document reference, snapshot, or metadata. Before I attempt to use my own calculation, does anyone know of an official or unofficial function for this? Here is my (completely untested) first cut for such a function from my interpretation of the docs at https://firebase.google.com/docs/firestore/storage-size function calcFirestoreDocSize