BSON_VECTOR_PACKED_BIT_VIEW_INIT(3)

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

πŸ¦‹ BSON_VECTOR_PACKED_BIT_VIEW_INIT(3) β€” libbson πŸ¦‹

πŸ’– NAME πŸ’–

okay bestie, bson_vector_packed_bit_view_init is literally the function that initializes a bson_vector_packed_bit_view_t from a mutable uint8_t buffer. iconic behavior, no cap ✨

🌸 SYNOPSIS 🌸

          bool
          bson_vector_packed_bit_view_init (bson_vector_packed_bit_view_t *view_out,
                                            uint8_t *binary_data,
                                            uint32_t binary_data_len);

πŸŽ€ PARAMETERS πŸŽ€

  • view_out β€” a bson_vector_packed_bit_view_t is written here on success πŸ’–
  • binary_data β€” a pointer to the BSON Binary data block to be validated 🫢
  • binary_data_len β€” length of the binary data block, in bytes. periodt.

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: the length, header, and trailing padding of the provided binary data block get checked for a valid Vector of packed_bit element type πŸ”₯

on success, the pointer and length are packaged as a bson_vector_packed_bit_view_t and written to *view_out. the view will only be valid as long as binary_data is valid β€” no cap, bestie, don't let the buffer dip while the view is still out here πŸ’…

⭐ RETURNS ⭐

returns true if the view was successfully initialized. slay βœ…

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc

2009-present, MongoDB, Inc.

xoxo from libbson 2.5.6, dated Oct 09, 20 β€” mwah πŸ’‹

πŸ“¦ where this page comes from