Added support for the pigz program handling GZIP archives.

This commit is contained in:
Bastian Kleineidam 2012-04-06 12:59:52 +02:00
parent 4d0509e893
commit 021626aa82
4 changed files with 26 additions and 2 deletions

View File

@ -3,6 +3,7 @@
* Print help when unknown options are given.
* Print error when archive files do not exist.
* Added installation instructions in doc/install.txt
* Added support for the pigz program handling GZIP archives.
0.14 "Book of Dragons" (released 30.1.2012)

View File

@ -68,7 +68,7 @@ ArchiveMimetypes = {
# List of programs supporting the given encoding
EncodingPrograms = {
'gzip': ('gzip',),
'gzip': ('pigz', 'gzip'),
'bzip2': ('pbzip2', 'bzip2'),
'compress': ('compress',),
'lzma': ('lzma',),
@ -114,7 +114,7 @@ ArchivePrograms = {
'create': ('zip', '7z', '7za'),
},
'gzip': {
None: ('gzip', '7z', '7za'),
None: ('pigz', 'gzip', '7z', '7za'),
},
'lzh': {
None: ('lha',),

17
patoolib/programs/pigz.py Normal file
View File

@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2012 Bastian Kleineidam
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Archive commands for the pigz program."""
from patoolib.programs.gzip import extract_gzip, test_gzip, create_gzip, list_gzip

View File

@ -142,6 +142,12 @@ class TestArchives (ArchiveTest):
self.archive_commands('t.txt.gz', singlefile=True)
self.archive_extract('t.Z')
@needs_program('pigz')
def test_pigz (self):
self.program = 'pigz'
self.archive_commands('t.gz', singlefile=True)
self.archive_commands('t.txt.gz', singlefile=True)
@needs_program('uncompress.real')
def test_uncompress (self):
self.program = 'uncompress.real'