BSON_VECTOR_FL...RY_DATA_LENGTH(3)
π bson_vector_float32_binary_data_length π
okay bestie, this is the BSON_VECTOR_FL...RY_DATA_LENGTH(3) page from libbson, and it has exactly one iconic job: calculate the size of a BSON Binary field that would be needed to store a Vector with the indicated number of float32 elements. no cap π
β¨ SYNOPSIS β¨
uint32_t
bson_vector_float32_binary_data_length (size_t element_count);
π PARAMETERS π
element_countβ Number of elements, as asize_t.
πΈ DESCRIPTION πΈ
It checks element_count against the maximum representable size, then calculates the required Binary size. that's the whole plot π¦
π₯ RETURNS π₯
On success, it returns the required Binary size as a uint32_t greater than or equal to BSON_VECTOR_HEADER_LEN.
This length includes the 2-byte Vector header, but not the Binary subtype header or any other BSON headers. important detail, bestie π«Ά
If the element_count is too large to represent, it returns 0.
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
π that's the whole vibe. source/version:2.5.6(libbson); date on the footer:Oct 09, 202(yep, that's literally what it says π). mwah π
π¦ 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