PodMaster's solution is correct. Here is a tested version from the command line:

$ ls -l T*.pdf -rw-rw-r-- 1 zaxo zaxo 362870 Sep 3 2002 The_Perl_Review_0_ +5.pdf -rw-rw-r-- 1 zaxo zaxo 352282 Jan 6 2003 The_Perl_Review_0_ +6.pdf -rw-rw-r-- 1 zaxo zaxo 263105 Jan 6 2003 The_Perl_Review_0_ +7.pdf $ perl -MPerlIO::gzip -e'for (@ARGV) {local $/ = \4096; open my $ih, " +<:raw", $_ or warn $! and next; open my $oh, ">:gzip", $_.".gz" or wa +rn $! and next; while (<$ih>) { print $oh $_ }}' T*.pdf $ ls -l T*.pdf.gz -rw-rw-r-- 1 zaxo zaxo 331242 Jun 25 14:57 The_Perl_Review_0_ +5.pdf.gz -rw-rw-r-- 1 zaxo zaxo 327834 Jun 25 14:57 The_Perl_Review_0_ +6.pdf.gz -rw-rw-r-- 1 zaxo zaxo 235150 Jun 25 14:57 The_Perl_Review_0_ +7.pdf.gz $ file T*.pdf.gz The_Perl_Review_0_5.pdf.gz: gzip compressed data, deflated, last modif +ied: Fri Jun 25 14:57:55 2004, os: Unix The_Perl_Review_0_6.pdf.gz: gzip compressed data, deflated, last modif +ied: Fri Jun 25 14:57:56 2004, os: Unix The_Perl_Review_0_7.pdf.gz: gzip compressed data, deflated, last modif +ied: Fri Jun 25 14:57:56 2004, os: Unix $
The local $/ = \4096; statement makes perl read the input files in chunks of that size. That speeds things up quite a bit.

Evidently PDF files are not too redundant to begin with. They don't gzip all that much tighter.

After Compline,
Zaxo


In reply to Re: Using PerlIO::gzip by Zaxo
in thread Using PerlIO::gzip by heigold1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.