Skip to content

Commit

Permalink
Enable zst compression
Browse files Browse the repository at this point in the history
  • Loading branch information
veebkolm committed Mar 28, 2024
1 parent 38aa66f commit f0b60bc
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Backup/Target/Compression/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class Factory
'gzip' => 'Gzip',
'bzip2' => 'Bzip2',
'xz' => 'Xz',
'zip' => 'Zip'
'zip' => 'Zip',
'zstd' => 'Zstd'
];

/**
Expand Down
44 changes: 44 additions & 0 deletions src/Backup/Target/Compression/Zstd.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
namespace phpbu\App\Backup\Target\Compression;

/**
* Zstd
*
* @package phpbu
* @subpackage Backup
* @author Sebastian Feldmann <[email protected]>
* @copyright Sebastian Feldmann <[email protected]>
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
* @link http://phpbu.de/
* @since Class available since Release 3.2.1
*/
class Zstd extends Abstraction
{
/**
* Command name
*
* @var string
*/
protected $cmd = 'zstd';

/**
* Suffix for compressed files
*
* @var string
*/
protected $suffix = 'zst';

/**
* MIME type for compressed files
*
* @var string
*/
protected $mimeType = 'application/zstd';

/**
* Can this compression compress piped output
*
* @var bool
*/
protected $pipeable = true;
}
1 change: 1 addition & 0 deletions src/Cli/Executable/Tar.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class Tar extends Abstraction implements Executable
'bzip2',
'gzip',
'xz',
'zstd'
];

/**
Expand Down

0 comments on commit f0b60bc

Please sign in to comment.