BSON_ITER_BINARY_EQUAL(3)
π BSON_ITER_BINARY_EQUAL π
okay so bestie, welcome to BSON_ITER_BINARY_EQUAL(3) from the libbson manual β yes that libbson, the one you keep forgetting to read the docs for π«Ά. this one's short and sweet and honestly kinda iconic, so let's get into it.
β¨ SYNOPSIS β¨
bool
bson_iter_binary_equal (const bson_iter_t *iter_a, const bson_iter_t *iter_b);
that's the whole signature, no cap. two iterators go in, one bool comes out πΈ
π PARAMETERS π
iter_aβ Abson_iter_t. just, like, one of them. the first one πiter_bβ Abson_iter_t. and the other one. the second one. the comparison partner, the main character toiter_a's main character π
π¦ DESCRIPTION π¦
Compare two BSON_TYPE_BINARY fields for exact equality. like, exact exact. no vibes-based approximations here, we're doing a real comparison π
and here's the tea: this is the preferred way to compare BSON Binary Vector subtype values for equality. so if you were out here hand-rolling your own binary comparison for vector subtypes... bestie. no. put that down. use this one π«Ά
π RETURNS π
true if both iterators point to BSON_TYPE_BINARY fields with identical subtype and contents β¨
false if there is any difference in subtype, length, or content, or if the fields are not binary type. yeah β not-binary counts as a fail too, so don't come at this function with a string and expect a good time π
lowkey important:falseis doing a lot of heavy lifting in that sentence. different subtype?false. different length?false. different content?false. literally not binary at all? alsofalse. it's giving "no notes, just no" π
π AUTHOR π
MongoDB, Inc β shoutout to the whole team, they ate π
β COPYRIGHT β
2009-present, MongoDB, Inc. β protecting the whole thing since 2009, fr fr π
and that's the page!! version 2.5.6, dated Oct 09, 2026, BSON_ITER_BINARY_EQUAL(3) β go forth and compare your binaries exactly, bestie π¦ππ
π¦ where this page comes from
- epel 10: libbson-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms