delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/08/27/14:29:34

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <503BBC6D.2030403@etr-usa.com>
Date: Mon, 27 Aug 2012 12:29:01 -0600
From: Warren Young <warren AT etr-usa DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Cygwin-L <cygwin AT cygwin DOT com>
Subject: Re: gzip 1.4-1 creates corrupt archive
References: <98106E7FBCC84B84880593C9916C9502 AT AMIGIME>
In-Reply-To: <98106E7FBCC84B84880593C9916C9502@AMIGIME>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

On 8/25/2012 12:11 AM, Peter wrote:
>
> cat "$LOG" | gzip > "$LOG.old.gz"

Generally speaking, cat with a single file is a sign you're not using 
redirection to its fullest.  In this case, you get the same effect with 
much less overhead with:

     gzip < "$LOG" > "$LOG.old.gz"

> The resulting archive was corrupt.

Evidenced by...?

I don't disbelieve you, but can't you at least produce a "hello world" 
example file that shows the problem and send it to the list, or put it 
on a public web server somewhere?

>>From my investigation I suspect there is something with textmode and binmode
> but I do not fully understand how to deal with it.

Why do you need the textmode hack?

That is to say, what non-Cygwin tools are you using that truly cannot 
cope with Unix LF line endings, thereby requiring Cygwin to do strange 
things in order to appease the native tools?

(Oh, and in case anyone reading this things I'm being a hypocrite after 
my arguments in the SQLite/svn thread, I'll reiterate that I don't like 
interop hacks and would like to avoid them wherever possible.  I'm 
hoping to find out that it is actually possible here.)

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019