public static function fromSlice(BitArray $bits, $offset = 0, $size = null)
	{
		$offset = $bits->getRealOffset($offset);
		$size = $bits->getRealSize($offset, $size);
		$slice = new BitArray($size);

		return $slice->directCopy($bits, 0, $offset, $size);
	}
public static function fromSlice(BitArray $bits, $offset = 0, $size = null)
	{
		$offset = $bits->getRealOffset($offset);
		$size = $bits->getRealSize($offset, $size);
		$slice = new BitArray($size);

		return $slice->directCopy($bits, 0, $offset, $size);
	}
public static function fromSlice ( BitArray $ bits , $ offset = 0 , $ size = null ) { $ offset = $ bits -> getRealOffset ( $ offset ) ; $ size = $ bits -> getRealSize ( $ offset , $ size ) ; $ slice = new BitArray ( $ size ) ; return $ slice -> directCopy ( $ bits , 0 , $ offset , $ size ) ; }
Create a new BitArray using a slice

@param   BitArray  $bits    A BitArray to get the slice
@param   int       $offset  If offset is non-negative, the slice will start at that offset in the bits argument.
If offset is negative, the slice will start from the end of the bits argument.
@param   mixed     $size    If size is given and is positive, then the slice will have up to that many elements in it.
If the bits argument is shorter than the size, then only the available elements will be present.
If size is given and is negative then the slice will stop that many elements from the end of the bits argument.
If it is omitted, then the slice will have everything from offset up until the end of the bits argument.

@return  BitArray  A new BitArray

@since   1.1.0
Create a new BitArray using a slice