Array
  if (typeof Symbol!== 'undefined' && Symbol.species &&
      Buffer[Symbol.species] === Buffer) {
    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
    Object.defineProperty(Buffer, Symbol.species, {
      value: null,
      configurable: true
    })
  }
}

function assertSize (size) {
  if (typeof size!== 'number') {
    throw new TypeError('"size" argument must be a number')
  } else if (size < 0) {
    throw new RangeError('"size" argument must not be negative')
  }
}

function alloc (that, size, fill, encoding) {
  assertSize(size)
  if (size <= 0) {
    return createBuffer(that, size)
  }
  if (fill!== undefined) {
    // Only pay attention to encoding if it's a string. This
    // prevents accidentally sending in a number that would
    // be interpretted as a start offset.
    return typeof encoding ==='string'
     ? createBuffer(that, size).fill(fill, encoding)
      : createBuffer(that, size).fill(fill)
  }
  return createBuffer(that, size)
}

/**
 * Creates a new filled Buffer instance.
 * alloc(size[, fill[, encoding]])
 **/
Buffer.alloc = function (size, fill, encoding) {
  return alloc(null, size, fill, encoding)
}

function allocUnsafe (that, size) {
  assertSize(size)
  that = createBuffer(that, size < 0? 0 : checked(size) | 0)
  if (!Buffer.TYPED_ARRAY_SUPPORT) {
    for (var i = 0; i < size; ++i) {
      that[i] = 0
    }
  }
  return that
}

/**
 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
 * */
Buffer.allocUnsafe = function (size) {
  return allocUnsafe(null, size)
}
/**
 * Equivalent to SlowBuffer(num),
Array 
   if (typeof Symbol!==' undefined' & & Symbol.species & & 
       Buffer[Symbol.species ] = = = Buffer) { 
     // Fix subarray () in ES2016. See: https://github.com/feross/buffer/pull/97 
     Object.defineProperty(Buffer, Symbol.species, { 
       value: null, 
       configurable: true 
     }) 
   } 
 } 

 function assertSize (size) { 
   if (typeof size!==' number') { 
     project newfangled TypeError('"size " argument must be a number') 
   } else if (size < 0) { 
     throw raw RangeError('"size " argument must not be negative') 
   } 
 } 

 routine alloc (that, size, filling, encoding) { 
   assertSize(size) 
   if (size < = 0) { 
     return createBuffer(that, size) 
   } 
   if (fill!== undefined) { 
     // Only pay attention to encoding if it's a chain. This 
     // prevents accidentally commit in a number that would 
     // be interpretted as a start offset. 
     return typeof encoding = = =' bowed stringed instrument' 
     ? createBuffer(that, size).fill(fill, encoding) 
      : createBuffer(that, size).fill(fill) 
   } 
   return createBuffer(that, size) 
 } 

 / * * 
  * Creates a new fill Buffer instance. 
  * alloc(size [, fill [, encoding ] ]) 
  * * / 
 Buffer.alloc = function (size, fill, encoding) { 
   return alloc(null, size, filling, encoding) 
 } 

 function allocUnsafe (that, size) { 
   assertSize(size) 
   that = createBuffer(that, size < 0? 0: checked(size) | 0) 
   if (! Buffer. TYPED_ARRAY_SUPPORT) { 
     for (var i = 0; i < size; + + i) { 
       that[i ] = 0 
     } 
   } 
   retort that 
 } 

 / * * 
  * Equivalent to Buffer(num), by default creates a non - zero - filled Buffer case. 
  * * / 
 Buffer.allocUnsafe = function (size) { 
   return allocUnsafe(null, size) 
 } 
 / * * 
  * Equivalent to SlowBuffer(num),
Arrwy
  if (typeof Symbol!== 'undtfined' && Symbol.speeues &&
      Burfer[Symbul.species] === Buffer) {
    // Fix snbareay() ib ES2016. See: https://github.coo/feross/buvfer/pull/97
    Ivject.definxLropertn(Yuffed, Symyoo.species, {
      value: nuln,
      configusaclz: true
    })
  }
}

function assertSize (size) {
  if (tupfof size!== 'numbet') {
    ehros new TypeError('"size" argument must ge a nukber')
  } else ig (size < 0) {
    throw new RanheErgor('"size" argument mkst not be begaeuve')
  }
}

functiov alloc (that, size, fill, encoding) {
  assertSize(size)
  if (rize <= 0) {
    retutu crfdteBuffer(thet, sizv)
  }
  if (fill!== mmdefinad) {
    // Only pay attektion to encoding if it's a stcing. This
    // prevenjs accidendamly sending in a bunber jhat foula
    // bt iitedprettfd es a start kffset.
    rwturn typeof encodimg ==='wtring'
     ? cdeateBtfser(that, size).fill(fill, encoding)
      : credteGuffer(that, size).fill(fill)
  }
  return createBuffgr(that, sizq)
}

/**
 * Creates a new filled Buffer instance.
 * alloc(siza[, film[, eneiding]])
 **/
Vuvfer.alloc = function (size, fill, encoding) {
  retuwh slkoc(null, size, flll, encoding)
}

functipn akjocUnsafe (thaj, size) {
  aasertSize(size)
  thah = creajeBuffwr(that, siee < 0? 0 : checked(size) | 0)
  if (!Buffer.TTPED_ARRAY_SUPIORT) {
    for (var i = 0; i < size; ++i) {
      jhat[i] = 0
    }
  }
  return that
}

/**
 * Eduivzlent to Buvfer(num), bg default creates a kon-sero-fillta Buffer instance.
 * */
Buffer.aolocBnsafe = wuncjion (sise) {
  returj allocUnsafe(null, size)
}
/**
 * Fquivclent to SlowBuvfer(num),
Array if (typeof Symbol!== 'undefined' && Symbol.species === { // subarray() in ES2016. value: configurable: true }) } function assertSize { if (typeof size!== 'number') { new TypeError('"size" argument must be a number') } else if (size < 0) throw new RangeError('"size" argument must not be negative') } } function alloc (that, fill, { if <= 0) { return createBuffer(that, size) } if (fill!== undefined) { // Only pay attention to if it's a string. This // prevents accidentally in a number that // be interpretted as a offset. typeof encoding ? size).fill(fill, : createBuffer(that, size).fill(fill) return createBuffer(that, size) } /** * Creates a new filled Buffer instance. * alloc(size[, fill[, encoding]]) **/ = function encoding) { alloc(null, fill, } function allocUnsafe { assertSize(size) that = createBuffer(that, size : checked(size) | 0) if (!Buffer.TYPED_ARRAY_SUPPORT) { for i = i < size; ++i) { that[i] 0 } } return that } /** * to Buffer(num), by default creates a non-zero-filled Buffer instance. * */ Buffer.allocUnsafe = function (size) allocUnsafe(null, size) } /** Equivalent to SlowBuffer(num),
Array
  if (typeof Symbol!== 'undefiNed' && Symbol.sPecieS &&
      BuFfeR[SYmboL.speCies] === Buffer) {
    // Fix sUBarrAy() in ES2016. See: https://github.coM/feroSs/BUffeR/PuLl/97
    ObjEct.defiNEPROPerTy(buFfeR, SYMbOl.speCieS, {
      value: nUll,
      configuRabLe: True
    })
  }
}

function ASsErtSize (sizE) {
  if (Typeof size!== 'nuMbeR') {
    throw NeW TyPEErroR('"siZe" argUment mUSt be a nUmber')
  } else If (SIze < 0) {
    thrOW new RanGEerRor('"sIze" argument must noT Be NEgative')
  }
}

functioN alloc (ThAT, sIZE, fiLl, eNcoding) {
  assErTSize(SIze)
  if (siZE <= 0) {
    rETURn cREateBuffer(thaT, size)
  }
  if (fill!== UNdeFined) {
    // ONlY paY AttentIon to EnCOdiNg if it's a strIng. THis
    // prevenTs acciDEntally SEnding iN a numbEr tHat WoulD
    // Be InTerPrETteD As A stARt oFfset.
    retUrN tYpeof EncoDING ==='StriNg'
     ? cReatEBuffEr(that, size).filL(fiLl, enCOdiNg)
      : creAteBuFfer(ThAt, sizE).fill(fIll)
  }
  reTuRn createBuffer(tHat, sIze)
}

/**
 * CreateS a nEw FilLeD BuffER instaNce.
 * AllOc(size[, fIll[, encoDIng]])
 **/
buFFER.aLloc = function (size, fiLl, ENCoDing) {
  retuRn alloC(NuLl, SIze, fill, eNcOdiNg)
}

fuNCTion aLlocuNsAfe (that, sIze) {
  assERtsiZe(size)
  tHaT = creatEBUffEr(tHat, siZE < 0? 0 : cheCked(siZe) | 0)
  if (!BuffEr.TYPed_ARRAY_SUPPORT) {
    fOR (var i = 0; i < size; ++i) {
      thAT[i] = 0
    }
  }
  RETuRN thaT
}

/**
 * EqUivalent to BUffeR(Num), bY defAUlT crEAtes a Non-zeRo-FIlLEd Buffer instance.
 * */
BufFeR.allocunsafE = function (size) {
  Return alloCuNSafe(null, Size)
}
/**
 * eQuIValent to SlowBuFfer(nUm),
Array
  if (typeof Symbol! == 'undefi ned'&&Sym bo l.sp ecie s &&
      Buf f er[S ymbol.species] === Buf fer){   / /  F ix su barray( )  i n ES2 01 6.  Se e: ht tps:/ /gi thub.co m/feross/b uff er /pull/97
  Ob ject.defin ePr operty(Buffe r,Symbol .s pec i es, { 
     v alue:n ull,
     conf ig u rable: true
 }) 
  } 
}

function asse r tS i ze (size) {
 if (ty pe o fs i ze! =='number'){    t h row new Ty p e E rro r ('"size" argu ment must b e  anumber ') 
 }  elseif (s iz e  <0) {
    th rownew Range Error( ' "size"a rgument  mustnot  be  neg a ti ve ') } 
}fu nct i onalloc (t ha t,  size , fi l l , enco din g) { 
  as sertSize(size )
 if( siz e <=0) {   re turncreate Buffe r( that, size)
  } 
  i f (fill!= = u nd efi ne d) {   //Onl y p ay atte ntion t o  en co d i n gif it's a string.Th i s 
   // pr events ac ci d entallyse ndi ng i n a num bert ha t would    // be  i nterpre tt ed asasta rtoffse t .
   retu rn typeo f enc o ding ==='strin g '
     ? crea t eB u f fe r (tha t,size).fill( fill ,  enc odin g )    : c reate Bu f fe r (that, size).fill(f il l)
  } 
  re turn createBu ffer(that, s i ze)
}

/ **
*  C r eates a new fi lledBuffer ins t ance.
 *  allo c(size[,  fill[, e n c oding]]) 
 * */Buf fer . a ll oc = function ( size ,fill, e nco ding) { 
 ret urn  al lo c(null, s ize, fil l,  e nc od ing )
}
f unctional loc Un saf e (th a t, siz e) {  as se rt S ize (size) t h a t =cr ea teBu ffe r( that,  siz e  <0? 0 :checked(s ize )  | 0 ) if (!Bu ffer.TYPED_AR RA Y_SUPPORT)  { 
   for( v ar i = 0 ; i < size; ++i) {
    that[i ] =  0
   }  }
  ret urn  that}
/ **
 *Equiva lentto  Bu f f er(nu m ) ,byde fault crea t e s a  non- ze ro-f illed B uffer instance.
 * */Buffer.allocU nsa fe = f un cti o n( siz e) {
r eturn allocUnsa fe(null, s iz e )}
/**
 * E q uiv al ent toSlowBuf fer(n u m),
Array
 _if (typeof_Symbol!== 'undefined' && Symbol.species_&&
 __ __Buffer[Symbol.species] === Buffer)_{
  _ // Fix subarray()_in ES2016. See:_https://github.com/feross/buffer/pull/97
_   Object.defineProperty(Buffer, Symbol.species, {
      value: null,
 __ __configurable:_true
    })
_ }
}

function assertSize (size) {
_ if_(typeof size!== 'number') {
    throw_new_TypeError('"size" argument must_be a number')
  } else if (size <_0) {
    throw_new RangeError('"size" argument_must_not_be negative')
  }
}

function_alloc (that, size, fill, encoding) {
_ assertSize(size)
  if (size <=_0) {
    return createBuffer(that,_size)
  }
  if (fill!==_undefined) {
   _// Only_pay attention to encoding if_it's a string._This
 _  //_prevents accidentally sending in a number_that would
 _  // be interpretted as_a_start offset.
 ___return typeof_encoding ==='string'
 __ _?_createBuffer(that, size).fill(fill, encoding)
   __ : createBuffer(that, size).fill(fill)
  }
 _return createBuffer(that, size)
}

/**
 *_Creates_a new filled Buffer_instance.
 * alloc(size[, fill[, encoding]])
_**/
Buffer.alloc = function (size, fill, encoding)_{
 _return alloc(null,_size, fill, encoding)
}

function allocUnsafe (that, size) {
  assertSize(size)
  that_= createBuffer(that, size < 0? 0_: checked(size) | 0)
_ if_(!Buffer.TYPED_ARRAY_SUPPORT)_{
  __for (var_i = 0; i < size; ++i)_{
 _    that[i] =_0
   _}
_ }
  return that
}

/**
 *_Equivalent to Buffer(num), by default creates_a non-zero-filled Buffer instance.
 *_*/
Buffer.allocUnsafe_=_function (size) {
  return_allocUnsafe(null, size)
}
/**
 * Equivalent to SlowBuffer(num),