ion-docs icon indicating copy to clipboard operation
ion-docs copied to clipboard

Do we need `compact_string`?

Open toddjonker opened this issue 2 years ago • 0 comments
trafficstars

As noted in the binary encoding chapter:

  • Do we need a compact_string encoding? It saves a byte for string lengths >16 and <128.

Personally, I'm inclined to add it.

  • Strings in that length range are quite common. At scale, the byte-saving for shorter strings is meaningful.
  • It improves symmetry with symbol, user's won't be surprised by its absence.
  • Implementation is obvious and simple.

toddjonker avatar Jun 01 '23 18:06 toddjonker