Initial buffer default size
Default BSON type
Function BSON type
Byte Array BSON type
Deprecated UUID BSON type @deprecated Please use SUBTYPE_UUID
UUID BSON type
MD5 BSON type
Encrypted BSON type
Column BSON type
User BSON type
Create a new Binary instance.
This constructor can accept a string as its first argument. In this case,
this string will be encoded using ISO-8859-1, not using UTF-8.
This is almost certainly not what you want. Use new Binary(Buffer.from(string))
instead to convert the string to a Buffer using UTF-8 first.
a buffer object containing the binary data.
the option binary type.
Updates this binary with byte_value.
a single byte we wish to write.
Writes a buffer or string to the binary.
a string or buffer to be written to the Binary BSON object.
specify the binary of where to write the content.
Reads length bytes starting at position.
read from the given position in the Binary.
the number of bytes to read.
Returns the value of this binary as a string.
Will skip converting to a string
the length of the binary sequence
Generated using TypeDoc
A class representation of the BSON Binary type.