diff --git a/doc/changelog.txt b/doc/changelog.txt index 297511a..d43e66f 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -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) diff --git a/patoolib/__init__.py b/patoolib/__init__.py index 2ca9565..e6b48d4 100644 --- a/patoolib/__init__.py +++ b/patoolib/__init__.py @@ -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',), diff --git a/patoolib/programs/pigz.py b/patoolib/programs/pigz.py new file mode 100644 index 0000000..9e66532 --- /dev/null +++ b/patoolib/programs/pigz.py @@ -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 . +"""Archive commands for the pigz program.""" +from patoolib.programs.gzip import extract_gzip, test_gzip, create_gzip, list_gzip diff --git a/tests/test_archives.py b/tests/test_archives.py index 8317112..a24edfd 100644 --- a/tests/test_archives.py +++ b/tests/test_archives.py @@ -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'