API 参考
    正在准备搜索索引...

    函数 serializeWithBufferAndIndex

    • Serialize a Javascript object using a predefined Buffer and index into the buffer, useful when pre-allocating the space for serialization.

      参数

      • object: Document

        the Javascript object to serialize.

      • finalBuffer: Uint8Array

        the Buffer you pre-allocated to store the serialized BSON object.

      • 可选options: SerializeOptions

      返回 number

      the index pointing to the last written byte in the buffer.