Skip to content
Myr

Use crc instead of buffer-crc32 for speed

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 7eb65ee · Browse files · 3 files+4 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+4 added−3 removed

  • other:+4 added−3 removed

3 files+4 added−3 removed

modified:lib/utils.js+2 added-2 removed
1 unmodified line
2/**3 * Module dependencies.4 */56var crc = require('crc').crc32;7var mime = require('connect').mime8 , proxyaddr = require('proxy-addr')8 , crc32 = require('buffer-crc32')9 , crypto = require('crypto');10var typer = require('media-typer');1112/**
42 unmodified lines
55 var buf = Buffer.isBuffer(body)56 ? body57 : new Buffer(body, encoding)58 var len = buf.length59 return 'W/"' + len.toString(16) + '-' + crc32.unsigned(buf) + '"'59 return 'W/"' + len.toString(16) + '-' + crc(buf) + '"'60};6162/**63 * Make `locals()` bound to the given `obj`.
355 unmodified lines
modified:History.md+1 added
13.x2===34 * Use `crc` instead of `buffer-crc32` for speed5 * deps: connect@2.26.16 - deps: body-parser@~1.8.27 - deps: depd@0.4.58 - deps: express-session@~1.8.2
1763 unmodified lines
modified:package.json+1 added-1 removed