buffer-compare

Lexicographically compare two buffers.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
buffer-compare
401.1.17 years ago9 years agoMinified + gzip package size for buffer-compare in KB

Readme

Build Status
buffer-compare
Lexicographically compare two buffers.
var compare = require('buffer-compare');

// smaller
compare(new Buffer('abcd'),new Buffer(abcde)) === -1

// bigger
compare(new Buffer('abcdef'),new Buffer('abc')) === 1

// equal
compare(new Buffer('hi'),new Buffer('hi')) === 0