"use strict";function makeTable(){for(var r,e=[],t=0;t<256;t++){r=t;for(var c=0;c<8;c++)r=1&r?3988292384^r>>>1:r>>>1;e[t]=r}return e}function crc32(r,e,t,c){var n=crcTable,a=c+t;r^=-1;for(var u=c;u<a;u++)r=r>>>8^n[255&(r^e[u])];return r^-1}function crc32str(r,e,t,c){var n=crcTable,a=c+t;r^=-1;for(var u=c;u<a;u++)r=r>>>8^n[255&(r^e.charCodeAt(u))];return r^-1}var utils=require("./utils"),crcTable=makeTable();module.exports=function(r,e){if("undefined"==typeof r||!r.length)return 0;var t="string"!==utils.getTypeOf(r);return t?crc32(0|e,r,r.length,0):crc32str(0|e,r,r.length,0)};