That's actually the module that I wrote for this purpose (adapted Mark Adler's 
C code) - I haven't optimised it very much.

Brandon Owen 
GNSS Network Operator  |  Geodesy and Seismic Monitoring Group
Community Safety and Earth Monitoring Division  |  GEOSCIENCE AUSTRALIA
____________________________________________________________
Phone:  +61 2 6249 9192    Fax:  +61 2 6249 9999
Email:  brandon.o...@ga.gov.au    Web:  www.ga.gov.au
Cnr Jerrabomberra Avenue and Hindmarsh Drive Symonston ACT
GPO Box 378 Canberra ACT 2601 Australia
Applying geoscience to Australia's most important challenges


-----Original Message-----
From: Python-list 
[mailto:python-list-bounces+brandon.owen=ga.gov...@python.org] On Behalf Of 
Robert Kern
Sent: Tuesday, 5 July 2016 12:18 AM
To: python-list@python.org
Subject: Re: Gzip module does not support Unix compressed .Z files 
[SEC=UNOFFICIAL]

On 2016-07-04 09:00, dieter wrote:
> "Owen Brandon" <brandon.o...@ga.gov.au> writes:
>
>> I have a query regarding the support of decompression for Unix compressed .Z 
>> files in Python's gzip module. The gzip system utility supports this using 
>> the '-d' switch, but the python module does not.
>
> When I am right, then the "zipfile" module handles ".Z" compressed files.

No, that handles PKZIP .zip files. There are third-party modules that handle 
the .Z format, but shelling out to external programs may still be preferable:

   https://github.com/umeat/unlzw

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

--
https://mail.python.org/mailman/listinfo/python-list

Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is 
intended only for the person or entity to which it is addressed. If you are not 
the intended recipient, then you have received this e-mail by mistake and any 
use, dissemination, forwarding, printing or copying of this e-mail and its file 
attachments is prohibited. The security of emails transmitted cannot be 
guaranteed; by forwarding or replying to this email, you acknowledge and accept 
these risks.
-------------------------------------------------------------------------------------------------------------------------

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to