YourPaste - For your paste! Archive - Tools - Login

Posted by unknown on Sat 20 Jun 2009 14:48 249 views - Syntax: PHP - Expires: never - Report - IMG - Download -

  1. public function addShort($short) {
  2.                 $this->addByte($short >> 8);
  3.                 $short = $short - (($short >> 8) << 8);
  4.                 $this->addByte($short);
  5.         }
  6.        
  7.         public function addInteger($int) {
  8.                 $this->addByte($int >> 24 & 0xff);
  9.                 $int = $int - (($int >> 24 & 0xff) << 24);
  10.                 $this->addByte($int >> 16 & 0xff);
  11.                 $int = $int - (($int >> 16 & 0xff ) << 16);
  12.                 $this->addByte($int >> 8 & 0xff);
  13.                 $int = $int - (($int >> 8 & 0xff) << 8);
  14.                 $this->addByte($int);
  15.         }

Comments


Name:
Comment:

© 2010 YourPaste.net - Disclaimer