MongoDB.local SF, Jan 15: See the speaker lineup & ship your AI vision faster. Use WEB50 to save 50%
Find out more >
Docs Menu
Docs Home
/ /

Endianness

The BSON specification dictates that the encoding format is in little-endian. Many implementations simply ignore endianness altogether and expect that they are to be run on little-endian. Libbson supports both Big and Little Endian systems. This means we use memcpy() when appropriate instead of dereferencing and properly convert to and from the host endian format. We expect the compiler intrinsics to optimize it to a dereference when possible.

Back

Cross Platform Notes