Sha256: bb3adb2ee71860c9c8265d28455804667f280a75066f9e398462d9d40870de43
Contents?: true
Size: 448 Bytes
Versions: 17
Compression:
Stored size: 448 Bytes
Contents
// Generated by CoffeeScript 1.7.1 var Buffer, create; Buffer = require('buffer').Buffer; create = require('./create'); module.exports = create('crc1', function(buf, previous) { var accum, byte, crc, _i, _len; if (!Buffer.isBuffer(buf)) { buf = Buffer(buf); } crc = ~~previous; accum = 0; for (_i = 0, _len = buf.length; _i < _len; _i++) { byte = buf[_i]; accum += byte; } crc += accum % 256; return crc % 256; });
Version data entries
17 entries across 17 versions & 2 rubygems