GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
BSON_NEW_FROM_BUFFER(3) libbson BSON_NEW_FROM_BUFFER(3)

bson_t *
bson_new_from_buffer (uint8_t **buf,

size_t *buf_len,
bson_realloc_func realloc_func,
void *realloc_func_ctx);


  • buf: An out-pointer to a buffer containing a serialized BSON document, or to NULL.
  • buf_len: An out-pointer to the length of the buffer in bytes.
  • realloc_func: Optional bson_realloc_func for reallocating the buffer.
  • realloc_func_ctx: Optional pointer that will be passed as ctx to realloc_func.

Creates a new bson_t using the data provided.

The realloc_func, if provided, is called to resize buf if the document is later expanded, for example by a call to one of the bson_append functions.

If *buf is initially NULL then it is allocated, using realloc_func or the default allocator, and initialized with an empty BSON document, and *buf_len is set to 5, the size of an empty document.

A newly-allocated bson_t on success, or NULL.

MongoDB, Inc

2009-present, MongoDB, Inc.

July 3, 2025 1.30.4

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.