# Comparison and Equality

> StringZilla for JavaScript

`equal` reports whether two buffers hold identical bytes, returning a JavaScript boolean.
`compare` orders two buffers lexicographically, returning `-1`, `0`, or `1` as a plain number.

```javascript
assert.strictEqual(sz.equal(Buffer.from("abc"), Buffer.from("abc")), true);
assert.strictEqual(sz.compare(Buffer.from("abc"), Buffer.from("abd")), -1);
```

