logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

bson_endianness - Endianness

Author

       MongoDB, Inc

Name

       bson_endianness - 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.

See Also