patterns/bson: Support for multiple documents per file (#156)

* BSON support multiple documents per file

BSON files can contain consecutive documents glued one after another. An example of these is MongoDB FTDC metrics export.

[`bsondump`](https://github.com/mongodb/mongo-tools/blob/master/bsondump/bsondump.go) can unpack this type of BSON documents.

* Add accidentally deleted lines
This commit is contained in:
Yury Ershov
2023-09-10 17:39:32 +10:00
committed by GitHub
parent 81f4978656
commit 8eed75d783

View File

@@ -3,6 +3,7 @@
#pragma MIME application/bson
#include <std/mem.pat>
#include <type/time.pat>
enum Type : u8 {
@@ -128,4 +129,4 @@ struct Document {
padding[1];
};
Document document @ 0x00;
Document documents[while(!std::mem::eof())] @ 0x00 [[inline]];