mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 18:52:50 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
29
node_modules/crc/lib/crc16_xmodem.js
generated
vendored
Normal file
29
node_modules/crc/lib/crc16_xmodem.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
// Generated by CoffeeScript 1.9.2
|
||||
var Buffer, create;
|
||||
|
||||
Buffer = require('buffer').Buffer;
|
||||
|
||||
create = require('./create');
|
||||
|
||||
module.exports = create('xmodem', function(buf, previous) {
|
||||
var code, count, crc, i;
|
||||
if (!Buffer.isBuffer(buf)) {
|
||||
buf = Buffer(buf);
|
||||
}
|
||||
crc = previous != null ? ~~previous : 0x0;
|
||||
count = buf.length;
|
||||
i = 0;
|
||||
while (count > 0) {
|
||||
code = crc >>> 8 & 0xFF;
|
||||
code ^= buf[i++] & 0xFF;
|
||||
code ^= code >>> 4;
|
||||
crc = crc << 8 & 0xFFFF;
|
||||
crc ^= code;
|
||||
code = code << 5 & 0xFFFF;
|
||||
crc ^= code;
|
||||
code = code << 7 & 0xFFFF;
|
||||
crc ^= code;
|
||||
count--;
|
||||
}
|
||||
return crc;
|
||||
});
|
||||
Reference in New Issue
Block a user