optimization and cleanup

This commit is contained in:
smiley
2016-02-24 02:49:53 +01:00
parent 3c4102d4b5
commit 99084fcb9f
9 changed files with 133 additions and 119 deletions
+3 -2
View File
@@ -41,8 +41,9 @@ class BitBuffer{
*/
public function put($num, $length){
for($i = 0; $i < $length; $i++){
$this->putBit(($num >> ($length - $i - 1))&1 === 1);
$i = 0;
while($i < $length){
$this->putBit(($num >> ($length - $i - 1))&1 === 1); $i++;
}
}