anchor.diff:  function bson_iter_double(const iter : bson_iter_p) : Double; cdecl; external LibBson_DLL;
   function bson_iter_utf8(const iter : bson_iter_p; length : PLongWord) : PAnsiChar; cdecl; external LibBson_DLL;
   function bson_iter_date_time(const iter : bson_iter_p) : Int64; cdecl; external LibBson_DLL;
  -function bson_iter_bool(const iter : bson_iter_p) : Boolean; cdecl; external LibBson_DLL;
  +function bson_iter_bool(const iter : bson_iter_p) : ByteBool; cdecl; external LibBson_DLL;
   function bson_iter_code(const iter : bson_iter_p; length : PLongWord) : PAnsiChar; cdecl; external LibBson_DLL;
   function bson_iter_symbol(const iter : bson_iter_p; length : PLongWord) : PAnsiChar; cdecl; external LibBson_DLL;
   function bson_iter_codewscope(const iter : bson_iter_p; length, scope_len : PLongWord;
  
positive.code: function bson_copy(const bson : bson_p) : Pointer; cdecl; external LibBson_DLL;
  procedure bson_copy_to(const src : bson_p; dst : bson_p); cdecl; external LibBson_DLL;
  procedure bson_init(bson : bson_p); cdecl; external LibBson_DLL;
  function bson_init_from_json(bson : bson_p; const json: PAnsiChar; len : Integer; error : bson_error_p) : Boolean;
    cdecl; external LibBson_DLL;
  function bson_init_static(bson : bson_p; const data : PByte; length : Cardinal) : Boolean;
    cdecl; external LibBson_DLL;
  procedure bson_destroy(bson : bson_p); cdecl; external LibBson_DLL;
  function bson_concat(dst : bson_p; const src : bson_p) : Boolean; cdecl; external LibBson_DLL;
  function bson_get_data(const bson : bson_p) : PByte; cdecl; external LibBson_DLL;
  function bson_as_json(const bson : bson_p; length : PCardinal) : PAnsiChar; cdecl; external LibBson_DLL;
  function bson_append_utf8(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    const value : PAnsiChar; length : Integer) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_code(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    const javascript : PAnsiChar) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_symbol(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    const value : PAnsiChar; length : Integer) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_int32(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    value : LongInt) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_int64(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    value : Int64) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_double(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    value : Double) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_date_time(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    value : Int64) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_bool(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    value : Boolean) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_oid(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    const value : PBsonOIDBytes) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_code_with_scope(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    const javascript : PAnsiChar; const scope : Pointer) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_regex(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    const regex : PAnsiChar; const options : PAnsiChar) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_timestamp(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    timestamp : LongWord; increment : LongWord) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_binary(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    subtype : TBsonSubtype; const binary : PByte; length : LongWord) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_null(bson : bson_p; const key : PAnsiChar; key_length : Integer) : Boolean;
    cdecl; external LibBson_DLL;
  function bson_append_undefined(bson : bson_p; const key : PAnsiChar; key_length : Integer) : Boolean;
    cdecl; external LibBson_DLL;
  function bson_append_document(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    const value: bson_p) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_document_begin(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    child: bson_p) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_document_end(bson, child : bson_p) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_array_begin(bson : bson_p; const key : PAnsiChar; key_length : Integer;
    child: Pointer) : Boolean; cdecl; external LibBson_DLL;
  function bson_append_array_end(bson, child : bson_p) : Boolean; cdecl; external LibBson_DLL;
  
  procedure bson_oid_init(oid : PBsonOIDBytes; context : Pointer); cdecl; external LibBson_DLL;
  procedure bson_oid_init_from_string(oid : PBsonOIDBytes; const str : PAnsiChar); cdecl; external LibBson_DLL;
  procedure bson_oid_to_string(oid : PBsonOIDBytes; str : PAnsiChar); cdecl; external LibBson_DLL;
  
  function bson_iter_init(iter : bson_iter_p; const bson : bson_p) : Boolean; cdecl; external LibBson_DLL;
  function bson_iter_init_find(iter : bson_iter_p; const bson : bson_p; const key : PAnsiChar) : Boolean;
    cdecl; external LibBson_DLL;
  function bson_iter_type(const iter : bson_iter_p) : TBsonType; cdecl; external LibBson_DLL;
  function bson_iter_next(iter : bson_iter_p) : Boolean; cdecl; external LibBson_DLL;
  function bson_iter_key(const iter : bson_iter_p) : PAnsiChar; cdecl; external LibBson_DLL;
  function bson_iter_recurse(const iter : bson_iter_p; child : bson_iter_p) : Boolean; cdecl; external LibBson_DLL;
  
  function bson_iter_oid(const iter : bson_iter_p) : PBsonOIDBytes; cdecl; external LibBson_DLL;
  function bson_iter_int32(const iter : bson_iter_p) : LongInt; cdecl; external LibBson_DLL;
  
negative.code:   Tbson_iter_double = function(const iter : bson_iter_p) : Double; cdecl;
    Tbson_iter_utf8 = function(const iter : bson_iter_p; length : LongWord) : PAnsiChar; cdecl;
    Tbson_iter_date_time = function(const iter : bson_iter_p) : Int64; cdecl;
    Tbson_iter_bool = function(const iter : bson_iter_p) : ByteBool; cdecl;
    Tbson_iter_code = function(const iter : bson_iter_p; length : PLongWord) : PAnsiChar; cdecl;
    Tbson_iter_symbol = function(const iter : bson_iter_p; length : PLongWord) : PAnsiChar; cdecl;
    Tbson_iter_codewscope = function(const iter : bson_iter_p; length, scope_len : PLongWord;
  