BSON_VECTOR_PA..._VIEW_PACK_BOOL(3)

πŸ“¦
version 2.5.6 Β· 3 versions
, in epel 10

πŸ’… BSON_VECTOR_PA..._VIEW_PACK_BOOL

okay so this is a libbson page, bestie β€” it's bson_vector_packed_bit_view_pack_bool(3), the girlies on the manual squad just had to squish the name down to BSON_VECTOR_PA..._VIEW_PACK_BOOL(3) so it'd fit in the header πŸ’€. Its whole job? Packing a contiguous block of elements from a C bool array into a bson_vector_packed_bit_view_t. That's it. That's the gig. slay.


✨ SYNOPSIS ✨

bool
bson_vector_packed_bit_view_pack_bool (bson_vector_packed_bit_view_t view,
                                       const bool *unpacked_values,
                                       size_t element_count,
                                       size_t vector_offset_elements)

πŸŽ€ PARAMETERS πŸŽ€

  • view β€” a valid bson_vector_packed_bit_view_t. like, it has to be valid bestie, no cap 🫢
  • unpacked_values β€” where the bool elements get packed from, the source of truth πŸ’–
  • element_count β€” how many elements we're packing, the headcount πŸ”’
  • vector_offset_elements β€” the vector index of the first element to pack, i.e. where in the vector we start 🎯

πŸ¦‹ DESCRIPTION πŸ¦‹

Elements get packed into individual Vector bits, and they come straight out of a C bool array. one bool per bit, cute little glow-up into packed-bit form ✨


πŸ”₯ RETURNS πŸ”₯

So if element_count and vector_offset_elements overflow the bounds of the Vector, it returns false and does literally nothing else β€” no other action taken, not a single bit touched πŸ™ˆ.

But if the parameters are in range? bestie, it's guaranteed to succeed. iconic. On success it returns true and writes element_count elements in the Vector, starting at vector_offset_elements. periodt. πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc β€” yes, that MongoDB πŸ’œ


2009-present, MongoDB, Inc. β€” all the rights, reserved and glowing ✨


ngl the only way this fails is the bounds check, so vibe check your offsets before you call it fr fr πŸ’€

okay that's the whole page, hope it ate πŸ“ β€” this was version 2.5.6, dated Oct 09, 20… (the last digits got cut off in the header, not me, blame the column width 😭), and that's your sign-off bestie, mwah πŸ’…πŸŽ€

πŸ“¦ where this page comes from