[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hmmmm. Can rad handle the new 88d stuff yet? (decoder?) (fwd)




===============================================================================
Robb Kambic                                Unidata Program Center
Software Engineer III                      Univ. Corp for Atmospheric Research
address@hidden             WWW: http://www.unidata.ucar.edu/
===============================================================================

---------- Forwarded message ----------
Date: Mon, 6 Nov 2000 17:05:06 -0600 (CST)
From: Kevin W. Thomas <address@hidden>
To: address@hidden, address@hidden
     address@hidden, address@hidden
Subject: Re: Hmmmm. Can rad handle the new 88d stuff yet? (decoder?)

>In a previous message to me, you wrote: 
>
> >
> >I wonder if there are any freeware type programs that we can run as a
> >decoder-like process that will uncompress
> >the incoming NIDS data, so the older programs like WXP,GEMPAK etc can use
> >the data??
> >
> >I'll  do some searching on the internet and see if I can find something
> >already available.
> >
> >Mike
> >
>
>Hi all,
>
>I've been looking too, and while the algorithm used by zlib
>is apparently the same as that used by pkzip (or zip on the
>unix end of things), which is called deflate/inflate, the
>pkzip/zip stuff won't work with it, because it doesn't have
>any of the 'pkzip' shell stuff around it. 
>
>I don't think there are any 'inflate from stdin' progs out
>there, so I'm playing around (and learning C at the same
>time) with trying to write my own.  It can't be that
>hard, right?  Just read in the zlib'd data via stdin, into
>an array, send it to the zlib routines to get back the
>original data, and send that back out through stdout.
>Not knowing C, it's gonna take some work to figure that
>out.
>
>If someone else is already working on such a beast, let me
>know, otherwise if I get something working I'll let you all
>know.
>
>Unidata folks, does GARP/Gempak support the new zlib'd noaaport files
>already, or are there plans for such support? I tried the stuff from
>NAWIPS-5.4pl17 and it didn't recognize them.
>
>Pete

Pete...

You are trying to make things too complicated.  Most data compression programs
have some easy of way of sending uncompressed data to stdout.  The ones that
I know about are:

        Scheme          Command to use
        pack            pcat
        compress        zcat
        gzip (ZLIB)     gzcat or zcat (depending on how it was built)
        bzip2           bzcat

The only one that I can't find a way, (at least via the man pages that I have)
is "zip".

As a sample:

        cat file.gz | gzcat

would get you the ungzipped version of "file".

By the way, if you really want to program via ZLIB, just use "gzopen" and
"gzread".  It is easy to do using these calls.

        Kevin W. Thomas
        Sun System Administrator & Meteorologist
        National Severe Storms Laboratory
        Norman, Oklahoma

        Email:  address@hidden