Use crc instead of buffer-crc32 for speed

This commit is contained in:
Douglas Christopher Wilson 2014-09-16 00:11:08 -07:00
parent 7eb65eeca2
commit f6ac068ab0
3 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
3.x
===
* Use `crc` instead of `buffer-crc32` for speed
* deps: connect@2.26.1
- deps: body-parser@~1.8.2
- deps: depd@0.4.5

View File

@ -3,9 +3,9 @@
* Module dependencies.
*/
var crc = require('crc').crc32;
var mime = require('connect').mime
, proxyaddr = require('proxy-addr')
, crc32 = require('buffer-crc32')
, crypto = require('crypto');
var typer = require('media-typer');
@ -56,7 +56,7 @@ exports.wetag = function wetag(body, encoding){
? body
: new Buffer(body, encoding)
var len = buf.length
return 'W/"' + len.toString(16) + '-' + crc32.unsigned(buf) + '"'
return 'W/"' + len.toString(16) + '-' + crc(buf) + '"'
};
/**

View File

@ -27,10 +27,10 @@
"homepage": "http://expressjs.com/",
"dependencies": {
"basic-auth": "1.0.0",
"buffer-crc32": "0.2.3",
"connect": "2.26.1",
"commander": "1.3.2",
"cookie-signature": "1.0.5",
"crc": "3.0.0",
"debug": "~2.0.0",
"depd": "0.4.5",
"escape-html": "1.0.1",