vbludov has asked for the wisdom of the Perl Monks concerning the following question:

Does anybody know how to create file in "compress" .Z file format ? gzip format is not an option

Replies are listed 'Best First'.
Re: .Z compress format
by diotalevi (Canon) on Oct 24, 2002 at 18:54 UTC

    (please someone correct me if I'm wrong)

    This is a patent issue with Unisys. Refer to http://www.faqs.org/faqs/compression-faq/part1/ and seek to "(c) LZ78" to find the relevant section. GNU gzip and zlib was created as attempt to work around the patent issues. As I recall you /might/ be able to get away with just creating a decode routine but an encode routine would certainly infringe on Unisys' patent. It's a pain but just use the binary compress/uncompress programs.

    __SIG__ use B; printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE;
Re: .Z compress format
by thor (Priest) on Oct 24, 2002 at 21:40 UTC
    I think that compress will read from a pipe (on Solaris, it does, though I don't know about elsewhere...). That having been said, you could do something like this:
    open(OUT,"|compress > outfile.Z") or die "Couldn't open pipe to compre +ss: $!"; print OUT "stuff\n"

    thor

Re: .Z compress format
by sch (Pilgrim) on Oct 24, 2002 at 18:35 UTC

    I'm not certain, but does Compress:Zlib do the job?

    But today you took me walking, Through a land that we have lost,
    While our children sit at websites, With no access to the cost