Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A C++ module for node-js to test if two buffers are equal, fast (could add diff later).
C++ Python JavaScript
branch: master
Failed to load latest commit information.
tests it works
.npmignore added .npmignore, and pushed the package to npm Updated node buffers
package.json bump to v1.0.1
readme.txt it works
wscript it works


This is a node.js module, written in C++, that compares two buffers.
For now it implements just eqBuf to test if two buffers are equal, fast.

It was written by Peteris Krumins (
His blog is at  --  good coders code, great reuse.


The module exports one function:

    * eqBuf - given two buffers, compare if they are equal.

Example usage:

    var eqBuf = require('bufferdiff');
    // ...
    if (eqBuf(buf1, buf2)) {
        sys.log('buffers buf1 and buf2 are equal');

How to compile?

As usual,

    node-waf configure build

The module will be called `bufferdiff.node`. To use it, make sure it's in NODE_PATH.

Extra info

This library was written for my and SubStack's StackVM startup:


Yo dawg, I heard you liked buffers so I put a buffer in yo buffer so you can
compare while you compare.

Peteris Krumins

Something went wrong with that request. Please try again.