Key size - 1 byte or 2 bytes

A key with a single character "k" takes up 1 or 2 bytes? In other words, does Couchbase treat the characters in a key as a 1-byte character or a 2-byte character?

Would it safe to assume that the full 8-bits can be used for a key? In other words, a single byte can represent 256 different keys?
Thanks...

In order to work with views, the keys should be UTF-8 encoded. You *can* use the full 8 bits of each byte in the key though if you don't care about views.

1 Answer

« Back to question.
coder_lol wrote:
A key with a single character "k" takes up 1 or 2 bytes? In other words, does Couchbase treat the characters in a key as a 1-byte character or a 2-byte character?

1