delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
From: | "Dave Korn" <dk AT artimi DOT com> |
To: | <cygwin AT cygwin DOT com> |
Subject: | RE: Problem with gzip |
Date: | Wed, 14 Apr 2004 15:57:38 +0100 |
MIME-Version: | 1.0 |
In-Reply-To: | <20040414143600.GB5982@coe.bosbc.com> |
Message-ID: | <NUTMEGHDgWwGgDpPvOb0000046c@NUTMEG.CAM.ARTIMI.COM> |
X-OriginalArrivalTime: | 14 Apr 2004 14:57:38.0546 (UTC) FILETIME=[D419ED20:01C42230] |
> -----Original Message----- > From: cygwin-owner On Behalf Of Christopher Faylor > Sent: 14 April 2004 15:36 > How about some *details* about how you made the suspect logs.tar.gz > file. He made it by taking a valid .gz file and running it through u2d! Or perhaps some accident with textmode mountpoints. Permit me to demonstrate by turning all the CR/LF pairs back into plain LFs (although to be precise, I should be referring to hex $0d and $0a bytes, since this file isn't an ASCII file and those aren't actually CR and LF in the context of raw binary data): ------->snip!<------- dk AT mace /davek> unzip test.zip Archive: test.zip creating: test/ creating: test/logs/ inflating: test/logs/config.log inflating: test/logs/my_check.log inflating: test/logs/my_conf.log extracting: test/logs.tar.gz dk AT mace /davek> cd test dk AT mace /davek/test> ls -la total 5 drwxr-xr-x+ 3 dk Domain U 0 Apr 6 11:40 . drwx------+ 30 dk Domain U 0 Apr 14 15:52 .. drwxr-xr-x+ 2 dk Domain U 0 Apr 6 11:22 logs -rw-r--r-- 1 dk Domain U 4707 Apr 6 11:37 logs.tar.gz dk AT mace /davek/test> mv logs old.logs dk AT mace /davek/test> sed -e 's/\\r\\n/\\n/g' logs.tar.gz >logs-fixed.tar.gz dk AT mace /davek/test> tar xfvz logs.tar.gz logs/ logs/config.log tar: Skipping to next header gzip: stdin: invalid compressed data--crc error gzip: stdin: invalid compressed data--length error tar: Archive contains obsolescent base-64 headers tar: Child returned status 1 tar: Error exit delayed from previous errors dk AT mace /davek/test> tar xfvz logs-fixed.tar.gz logs/ logs/config.log logs/my_check.log logs/my_conf.log dk AT mace /davek/test> ls -la logs/ total 25 drwxr-xr-x+ 2 dk Domain U 0 Apr 14 15:53 . drwxr-xr-x+ 4 dk Domain U 0 Apr 14 15:53 .. -rw-r--r-- 1 dk Domain U 6872 Apr 6 11:21 config.log -rw-r--r-- 1 dk Domain U 12183 Apr 6 11:21 my_check.log -rw-r--r-- 1 dk Domain U 5314 Apr 6 11:21 my_conf.log dk AT mace /davek/test> ------->snip!<------- Note that running d2u on the file won't fix it: d2u will delete all the $0d bytes regardless of whether they're followed by $0a or not, which isn't what we want; there's some genuine $0d's in there. > The above errors seem to indicate that gzip is correctly > detecting a damaged .gz file. Absolutely so. Every $0a byte got a bogus $0d prepended to it. No wonder it wouldn't unpack! cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |