Example #1
0
 /**
  * @return KiloBytes
  */
 public function kiloBytes()
 {
     return KiloBytes::allocateBytes(Bytes::allocateUnits($this->numberOfBytes()));
 }
Example #2
0
 /**
  * @param Bytes $bytes
  * @return self
  */
 public static function allocateBytes(Bytes $bytes)
 {
     return KiloBytes::allocateUnits(self::calculateUnitsFromBytes($bytes->numberOfBytes()));
 }