Does Firestore compress docs' data before sending it to the client?

Viewed 338

Does Firestore use any kind of compression to send/receive docs?

For example:

someDoc: {
  obj001: {
    rating: "VERY_BAD" | "BAD" | "GOOD" | "VERY_GOOD"  // ONE OF THESE VALUES
  },
  obj002: {...},
  // ... 500 HUNDRED OBJECTS IN THIS DOC
  obj500: {...},
}

I'm intentionally storing the rating property as a string. And it will add up if the object gets too big. Does Firestore use any kind of compression in those repetitive strings? Or will it send the full stringified version over the network without any compression?

I know that the max size for a document is 1MB.

1 Answers

No data compression is performed on the document data by the Firestore clients or servers.

If you'd like to see what actually is sent over the wire, I recommend creating a simple web app and checking out the network tab in your browser's developer console.

Related