Skip to content
Back to top

# bson_iter_binary_equal()

## Synopsis

    bool
    bson_iter_binary_equal (const bson_iter_t *iter_a, const bson_iter_t *iter_b);

## Parameters

- `iter_a`: A bson_iter_t.

- `iter_b`: A bson_iter_t.

## Description

Compare two BSON_TYPE_BINARY fields for exact equality.

This is the preferred way to compare BSON Binary Vector subtype values for equality.

## Returns

`true` if both iterators point to BSON_TYPE_BINARY fields with identical subtype and contents. `false` if there is any difference in subtype, length, or content, or if the fields are not binary type.