public function extract($to = null)
{
if ($this->compression == 'bz') {
$this->path = Compress\Bzip2::decompress($this->path);
$this->archive = new \Archive_Tar($this->path);
} else {
if ($this->compression == 'gz') {
$this->path = Compress\Gzip::decompress($this->path);
$this->archive = new \Archive_Tar($this->path);
}
}
$this->archive->extract(null !== $to ? $to : './');
}