.\" Man page generated from reStructuredText. . .TH "BSON_CROSS_PLATFORM_NOTES" "3" "Jun 04, 2021" "1.17.6" "libbson" .SH NAME bson_cross_platform_notes \- Cross Platform Notes . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH ENDIANNESS .sp 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 \fBmemcpy()\fP 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. .SH THREADING .sp Libbson\(aqs data structures are \fINOT\fP thread\-safe. You are responsible for accessing and mutating these structures from one thread at a time. .sp Libbson requires POSIX threads (pthreads) on all UNIX\-like platforms. On Windows, the native threading interface is used. Libbson uses your system\(aqs threading library to safely generate unique ObjectIds, and to provide a fallback implementation for atomic operations on platforms without built\-in atomics. .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .