import { Binary } from "https://deno.land/x/mongo@v0.31.2/mod.ts";
A class representation of the BSON Binary type.
Constructors
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.