Skip to main content
Module

x/web_bson/mod.js>deserializeStream

web_bson is a fork from mongodb/js-bson
Very Popular
Latest
function deserializeStream
import { deserializeStream } from "https://deno.land/x/web_bson@v0.3.0/mod.js";

Deserialize stream data as BSON documents.

Parameters

data: Uint8Array | ArrayBuffer
  • the buffer containing the serialized set of BSON documents.
startIndex: number
  • the start index in the data Buffer where the deserialization is to start.
numberOfDocuments: number
  • number of documents to deserialize.
documents: Document[]
  • an array where to store the deserialized documents.
docStartIndex: number
  • the index in the documents array from where to start inserting documents.
  • additional options used for the deserialization.

Returns

number

next index in the buffer after deserialization x numbers of documents.