X-Recipient: archive-cygwin@delorie.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@etr-usa.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@cygwin.com>
Subject: Re: gzip 1.4-1 creates corrupt archive
References: <98106E7FBCC84B84880593C9916C9502@AMIGIME>
In-Reply-To: <98106E7FBCC84B84880593C9916C9502@AMIGIME>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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

