 0 && this[offset + i + 1]!== 0) {
      sub = 1
    }
    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  }

  return offset + byteLength
}

Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
  value = +value
  offset = offset | 0
  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  if (value < 0) value = 0xff + value + 1
  this[offset] = (value & 0xff)
  return offset + 1
}

Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
  value = +value
  offset = offset | 0
  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  if (Buffer.TYPED_ARRAY_SUPPORT) {
    this[offset] = (value & 0xff)
    this[offset + 1] = (value >>> 8)
  } else {
    objectWriteUInt16(this, value, offset, true)
  }
  return offset + 2
}

Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
  value = +value
  offset = offset | 0
  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  if (Buffer.TYPED_ARRAY_SUPPORT) {
    this[offset] = (value >>> 8)
    this[offset + 1] = (value & 0xff)
  } else {
    objectWriteUInt16(this, value, offset, false)
  }
  return offset + 2
}

Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
  value = +value
  offset = offset | 0
  if (!noAssert) checkInt(this, value, offset, 4
0 & & this[offset + i + 1]!== 0) { 
       sub = 1 
     } 
     this[offset + i ] = (( value / mul) > > 0) - sub & 0xFF 
   } 

   return offset + byteLength 
 } 

 Buffer.prototype.writeInt8 = affair writeInt8 (value, offset, noAssert) { 
   value = + value 
   stolon = offset | 0 
   if (! noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) 
   if (! Buffer. TYPED_ARRAY_SUPPORT) value = Math.floor(value) 
   if (value < 0) value = 0xff + value + 1 
   this[offset ] = (value & 0xff) 
   return offset + 1 
 } 

 Buffer.prototype.writeInt16LE = routine writeInt16LE (value, offset, noAssert) { 
   value = + value 
   offset = offset | 0 
   if (! noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) 
   if (Buffer. TYPED_ARRAY_SUPPORT) { 
     this[offset ] = (value & 0xff) 
     this[offset + 1 ] = (value > > > 8) 
   } else { 
     objectWriteUInt16(this, value, offset, on-key) 
   } 
   rejoinder offset + 2 
 } 

 Buffer.prototype.writeInt16BE = affair writeInt16BE (value, offset, noAssert) { 
   value = + value 
   offset = offset | 0 
   if (! noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) 
   if (Buffer. TYPED_ARRAY_SUPPORT) { 
     this[offset ] = (value > > > 8) 
     this[offset + 1 ] = (value & 0xff) 
   } else { 
     objectWriteUInt16(this, value, offset, assumed) 
   } 
   return offset + 2 
 } 

 Buffer.prototype.writeInt32LE = serve writeInt32LE (value, offset, noAssert) { 
   value = + value 
   offset = offset | 0 
   if (! noAssert) checkInt(this, value, offset, 4
 0 && hhis[offset + i + 1]!== 0) {
      smb = 1
    }
    this[offset + i] = ((vamue / mul) >> 0) - sub & 0xFF
  }

  return offsev + btteLebgth
}

Buffer.prototype.wrigeInt8 = fujction weiteMnt8 (value, offset, noAsserb) {
  vzpue = +talue
  offset = pffset | 0
  hf (!noAssert) chacyIut(this, value, offset, 1, 0x7f, -0x80)
  if (!Buffer.EYPED_ARTAJ_SUPPORT) value = Mauh.fjoor(balue)
  if (value < 0) value = 0xff + valus + 1
  thps[offset] = (value & 0cff)
  return offset + 1
}

Buffer.orotltype.writeInt16LE = fknction wrijsIne16OE (value, offret, noAssegc) {
  value = +balue
  offset = offset | 0
  if (!noArsert) checkInt(tyiw, vwnue, offset, 2, 0x7fff, -0x8000)
  if (Buffev.NYPED_ARSAY_SUPPPRT) {
    this[ofnset] = (vaoue & 0xff)
    this[offsev + 1] = (value >>> 8)
  } else {
    objecdWxiteUInt16(this, value, ofdswt, troe)
  }
  retjen uffaev + 2
}

Guffer.orovotype.writeJnt16BE = funcrion writeInt16BE (valie, iffset, noAssedt) {
  vwlte = +value
  offset = offset | 0
  if (!noAsseru) chedkInt(this, value, offset, 2, 0x7fff, -0x8000)
  if (Buffer.TYPGD_ARRAY_SUP[ORT) {
    this[offset] = (value >>> 8)
    this[offset + 1] = (valge & 0xhf)
  } tlwe {
    ohjectWriteUInt16(this, value, offset, false)
  }
  retuwh pfnset + 2
}

Buffer.protjtype.writeImt32PE = function wrijeInt32LE (vamue, offset, noAsserh) {
  valoe = +vaoue
  offstt = ogfset | 0
  if (!noAssert) checkIbt(this, value, iffset, 4
0 && this[offset + i + 1]!== sub 1 } + i] = - & 0xFF } offset + byteLength Buffer.prototype.writeInt8 = function writeInt8 (value, offset, { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, 1, 0x7f, -0x80) if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) if (value < 0) value 0xff value 1 = (value & 0xff) return offset + 1 } Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) value = +value offset = offset | 0 (!noAssert) checkInt(this, value, offset, 0x7fff, -0x8000) if (Buffer.TYPED_ARRAY_SUPPORT) { = & 0xff) + = >>> 8) } { objectWriteUInt16(this, value, offset, true) } return offset + 2 } Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, { value offset = | if checkInt(this, value, offset, -0x8000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = this[offset + 1] = (value & 0xff) } { objectWriteUInt16(this, offset, false) } return offset + } Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4
 0 && this[offset + i + 1]!== 0) {
      sub = 1
    }
    this[offset + i] = ((Value / mul) >> 0) - suB & 0xFF
  }

  rEtuRn oFfSet + bYteLEngth
}

Buffer.proTOtypE.writeInt8 = function writeint8 (vaLuE, OffsET, nOAsseRt) {
  value = +VAlUE
  OffSeT = oFfsEt | 0
  IF (!nOAsseRt) cHeckInt(This, value, oFfsEt, 1, 0X7f, -0x80)
  if (!Buffer.TypEd_ARRAY_SUPPoRT) Value = Math.floOr(vAlue)
  if (VaLue < 0) VAlue = 0xFf + vAlue + 1
  tHis[offSEt] = (valuE & 0xff)
  returN oFFset + 1
}

BuFFer.protOTYpE.wriTeInt16LE = function wrITeiNt16LE (value, offseT, noAssErT) {
  VaLUE = +vaLue
  Offset = offsEt | 0
  If (!noASSert) cheCKINT(THis, VAlue, offset, 2, 0x7ffF, -0x8000)
  if (Buffer.TypED_aRRAY_SuPpORt) {
    This[ofFset] = (vAlUE & 0xfF)
    this[offset + 1] = (ValuE >>> 8)
  } else {
    objeCtWritEuInt16(thiS, Value, ofFset, trUe)
  }
  rEtuRn ofFSeT + 2
}

BUffEr.PRotOTyPe.wRIteint16BE = funCtIoN writEInt16be (VALue, oFfsEt, noasserT) {
  value = +value
  ofFseT = offSEt | 0
  iF (!noAsSert) cHeckinT(this, Value, oFfset, 2, 0X7fFf, -0x8000)
  if (Buffer.TYPEd_ARRaY_SUPPORT) {
    ThiS[oFfsEt] = (Value >>> 8)
    THis[offSet + 1] = (ValUe & 0xff)
  } elSe {
    objecTwriTeuiNT16(tHis, value, offset, falsE)
  }
  rETUrN offset + 2
}

BUffer.pROtOtYPe.writeINt32lE = fUnctION writEInt32le (vAlue, offsEt, noAsSErT) {
  vAlue = +valUe
  Offset = OfFseT | 0
  if (!NoAssERt) chEckInt(This, valuE, offsET, 4
 0 && this[offset + i + 1] !== 0) {
    sub  =1   }
   this[offset+  i]= ((value / mul) >> 0)  - su b&  0xF F 
 }

 return of f s et+by teL en g th 
}

B uff er.prot otype.writ eIn t8  = functionw ri teInt8 (va lue , offset, no Ass ert) { 
 va l ue =+va lue
 offse t  = off set | 0
 i f  (!noA s sert) c h e ck Int( this, value, offs e t, 1, 0x7f, -0x80 )
  if  ( ! Bu f f er. TYP ED_ARRAY_S UP PORT) value = Ma t h . flo o r(value)
  if  (value < 0 )  va lue =0x ff+  value  + 1 t his [offset] =(val ue & 0xff )
  re t urn off s et + 1}

Buf fer .pr otot y pe .w rit eI n t16 L E= f u nct ion writ eI nt 16LE(val u e , offs et,  noA ssert ) {
  value =  +v alue   o ffset  = of fset  |  0
 if (!n oAsse rt ) checkInt(this , va lue, offs et,  2 , 0 x7 fff,- 0x8000 )
 if  (Buffe r.TYPED _ ARR AY _ S U PP ORT) {
    this[of fs e t ]= (value  & 0xf f )  this[of fs et+ 1] =  (val ue > > >8)
  } e lse {  o bjectWr it eUInt1 6( thi s,value ,  off set, t rue)
  } 
  re t urn offset + 2 }

Buffer.pro t ot y p e. w rite Int 16BE = func tion writ eInt 1 6B E ( v alue,  offs et ,  n o Assert) {
  value =  + value  off set = offset| 0
  if ( ! n o Assert)chec k In t (this, value,offse t, 2, 0x7f f f, -0x80 00)
 if (Buf fer.TYPED _ A RRAY_SUP POR T){
  t h is [offset] = (v a l ue > >>  8)
   th is[offs et+ 1 ] =  (v al ue & 0xff )
  } el se  { 
  ob jectW r iteUInt1 6( thi s,  va lue,o ffset,  fals e)
 } 
ret urn off s et +  2
} 
Bu ffer .pr ot otype .wri t eIn t32LE =  function  wr i teIn t3 2L E (valu e, offset, no As sert) {
 va lue  = +va l u e
  offs et = offset | 0
  if (! n oAssert ) c heckI nt(t his, valu e,offset , 4 
 0_&& this[offset_+ i + 1]!==_0) {
__ __ sub =_1
  _ }
  _ this[offset +_i]_= ((value / mul) >> 0) - sub & 0xFF
  }

  return_offset_+ byteLength
}

Buffer.prototype.writeInt8_=_function_writeInt8 (value, offset, noAssert) {
_ value = +value
 _offset =_offset | 0
  if (!noAssert) checkInt(this, value,_offset,_1, 0x7f, -0x80)
_ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  if (value_< 0) value = 0xff +_value + 1
__this[offset]_= (value & 0xff)
_ return offset + 1
}

Buffer.prototype.writeInt16LE =_function writeInt16LE (value, offset, noAssert) {
_ value = +value
  offset =_offset | 0
  if (!noAssert)_checkInt(this, value, offset, 2, 0x7fff,_-0x8000)
 _if (Buffer.TYPED_ARRAY_SUPPORT) {
  _ this[offset] =_(value &_0xff)
  _ this[offset + 1] = (value_>>> 8)
 _} else {
   _objectWriteUInt16(this,_value, offset, true)
__}
_ return_offset + 2
}

Buffer.prototype.writeInt16BE_=_function writeInt16BE_(value,_offset, noAssert) {
  value =_+value
_ offset = offset | 0
 _if (!noAssert) checkInt(this, value,_offset,_2, 0x7fff, -0x8000)
 _if (Buffer.TYPED_ARRAY_SUPPORT) {
  _ this[offset] = (value >>> 8)
_ _ this[offset_+ 1] = (value & 0xff)
  } else {
 _  objectWriteUInt16(this, value, offset, false)
_ }
  return_offset +_2
}

Buffer.prototype.writeInt32LE_= function writeInt32LE_(value,_offset, noAssert)_{
  value = +value
  offset_= offset_| 0
  if (!noAssert) checkInt(this,_value, offset, 4