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β auint8_t. yes that's literally all the manpage says about it, don't come for me πlengthβ asize_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 π«Ά
π COPYRIGHT π
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
- 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