BSON_READER_NEW_FROM_DATA(3)

πŸ’… BSON_READER_NEW_FROM_DATA πŸ’…

okay bestie, welcome to bson_reader_new_from_data β€” it's a libbson joint, section 3 of the manual, and honestly? she's iconic and she's simple. let's get into it πŸŽ€


✨ SYNOPSIS ✨

bson_reader_t *
bson_reader_new_from_data (const uint8_t *data, size_t length);

like, that's the whole vibe. two args in, one reader out. slay πŸ’…


🌸 PARAMETERS 🌸

  • data β€” a uint8_t. yes that's literally all the manpage says about it, don't come for me πŸ™ˆ
  • length β€” a size_t. also exactly what it sounds like 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

so the bson_reader_new_from_data() function shall create a new bson_reader_t using the buffer you supply. that's it, that's the job, and she does it flawlessly ✨

but listen β€” data is NOT copied 🚨 and it MUST be valid for the lifetime of the resulting bson_reader_t. like, the entire lifetime. the whole time. no cap. if your buffer dips out early, that reader is gonna be reading garbage and it's giving undefined chaos πŸ’€ so keep that buffer alive and thriving, bestie 🧚


⭐ RETURNS ⭐

a newly allocated bson_reader_t. fresh out the box, main character energy, go treat her right πŸ‘‘


🌈 AUTHOR 🌈

MongoDB, Inc β€” the icons themselves 🫢


2009-present, MongoDB, Inc.


k that's the whole page, no notes πŸ’– this little beauty is libbson version 2.5.6, dated Oct 09, 2026, and it's BSON_READER_NEW_FROM_DATA(3) all day every day. mwah, go read some BSON πŸ“βœ¨

πŸ“¦ where this page comes from