bson-ext icon indicating copy to clipboard operation
bson-ext copied to clipboard

feat: setInternalBufferSize

Open vird opened this issue 2 years ago • 0 comments

Description

Support setInternalBufferSize (same as mongodb/js-bson)

What changed?

  • New function SetInternalBufferSize
  • Do not use global constant MAX_BSON_SIZE where possible
  • DataStream now can accept maxBSONSize
  • BSONSerializer<DataStream> added bson->maxBSONSize
  • New tests

Note there is bug with overflow when you try serialize javascript object larger than your internal buffer. See https://github.com/vird/bson-ext/tree/4.0_overflow_bug_testcase

vird avatar Mar 05 '23 04:03 vird