1package IO::Compress::Deflate ;
2
3require 5.006 ;
4
5use strict ;
6use warnings;
7use bytes;
8
9require Exporter ;
10
11use IO::Compress::RawDeflate 2.064 ();
12use IO::Compress::Adapter::Deflate 2.064 ;
13
14use IO::Compress::Zlib::Constants 2.064 ;
15use IO::Compress::Base::Common  2.064 qw();
16
17
18our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $DeflateError);
19
20$VERSION = '2.064';
21$DeflateError = '';
22
23@ISA    = qw(Exporter IO::Compress::RawDeflate);
24@EXPORT_OK = qw( $DeflateError deflate ) ;
25%EXPORT_TAGS = %IO::Compress::RawDeflate::DEFLATE_CONSTANTS ;
26
27push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ;
28Exporter::export_ok_tags('all');
29
30
31sub new
32{
33    my $class = shift ;
34
35    my $obj = IO::Compress::Base::Common::createSelfTiedObject($class, \$DeflateError);
36    return $obj->_create(undef, @_);
37}
38
39sub deflate
40{
41    my $obj = IO::Compress::Base::Common::createSelfTiedObject(undef, \$DeflateError);
42    return $obj->_def(@_);
43}
44
45
46sub bitmask($$$$)
47{
48    my $into  = shift ;
49    my $value  = shift ;
50    my $offset = shift ;
51    my $mask   = shift ;
52
53    return $into | (($value & $mask) << $offset ) ;
54}
55
56sub mkDeflateHdr($$$;$)
57{
58    my $method = shift ;
59    my $cinfo  = shift;
60    my $level  = shift;
61    my $fdict_adler = shift  ;
62
63    my $cmf = 0;
64    my $flg = 0;
65    my $fdict = 0;
66    $fdict = 1 if defined $fdict_adler;
67
68    $cmf = bitmask($cmf, $method, ZLIB_CMF_CM_OFFSET,    ZLIB_CMF_CM_BITS);
69    $cmf = bitmask($cmf, $cinfo,  ZLIB_CMF_CINFO_OFFSET, ZLIB_CMF_CINFO_BITS);
70
71    $flg = bitmask($flg, $fdict,  ZLIB_FLG_FDICT_OFFSET, ZLIB_FLG_FDICT_BITS);
72    $flg = bitmask($flg, $level,  ZLIB_FLG_LEVEL_OFFSET, ZLIB_FLG_LEVEL_BITS);
73
74    my $fcheck = 31 - ($cmf * 256 + $flg) % 31 ;
75    $flg = bitmask($flg, $fcheck, ZLIB_FLG_FCHECK_OFFSET, ZLIB_FLG_FCHECK_BITS);
76
77    my $hdr =  pack("CC", $cmf, $flg) ;
78    $hdr .= pack("N", $fdict_adler) if $fdict ;
79
80    return $hdr;
81}
82
83sub mkHeader
84{
85    my $self = shift ;
86    my $param = shift ;
87
88    my $level = $param->getValue('level');
89    my $strategy = $param->getValue('strategy');
90
91    my $lflag ;
92    $level = 6
93        if $level == Z_DEFAULT_COMPRESSION ;
94
95    if (ZLIB_VERNUM >= 0x1210)
96    {
97        if ($strategy >= Z_HUFFMAN_ONLY || $level < 2)
98         {  $lflag = ZLIB_FLG_LEVEL_FASTEST }
99        elsif ($level < 6)
100         {  $lflag = ZLIB_FLG_LEVEL_FAST }
101        elsif ($level == 6)
102         {  $lflag = ZLIB_FLG_LEVEL_DEFAULT }
103        else
104         {  $lflag = ZLIB_FLG_LEVEL_SLOWEST }
105    }
106    else
107    {
108        $lflag = ($level - 1) >> 1 ;
109        $lflag = 3 if $lflag > 3 ;
110    }
111
112     #my $wbits = (MAX_WBITS - 8) << 4 ;
113    my $wbits = 7;
114    mkDeflateHdr(ZLIB_CMF_CM_DEFLATED, $wbits, $lflag);
115}
116
117sub ckParams
118{
119    my $self = shift ;
120    my $got = shift;
121
122    $got->setValue('adler32' => 1);
123    return 1 ;
124}
125
126
127sub mkTrailer
128{
129    my $self = shift ;
130    return pack("N", *$self->{Compress}->adler32()) ;
131}
132
133sub mkFinalTrailer
134{
135    return '';
136}
137
138#sub newHeader
139#{
140#    my $self = shift ;
141#    return *$self->{Header};
142#}
143
144sub getExtraParams
145{
146    my $self = shift ;
147    return $self->getZlibParams(),
148}
149
150sub getInverseClass
151{
152    return ('IO::Uncompress::Inflate',
153                \$IO::Uncompress::Inflate::InflateError);
154}
155
156sub getFileInfo
157{
158    my $self = shift ;
159    my $params = shift;
160    my $file = shift ;
161
162}
163
164
165
1661;
167
168__END__
169
170=head1 NAME
171
172IO::Compress::Deflate - Write RFC 1950 files/buffers
173
174
175
176=head1 SYNOPSIS
177
178    use IO::Compress::Deflate qw(deflate $DeflateError) ;
179
180    my $status = deflate $input => $output [,OPTS]
181        or die "deflate failed: $DeflateError\n";
182
183    my $z = new IO::Compress::Deflate $output [,OPTS]
184        or die "deflate failed: $DeflateError\n";
185
186    $z->print($string);
187    $z->printf($format, $string);
188    $z->write($string);
189    $z->syswrite($string [, $length, $offset]);
190    $z->flush();
191    $z->tell();
192    $z->eof();
193    $z->seek($position, $whence);
194    $z->binmode();
195    $z->fileno();
196    $z->opened();
197    $z->autoflush();
198    $z->input_line_number();
199    $z->newStream( [OPTS] );
200
201    $z->deflateParams();
202
203    $z->close() ;
204
205    $DeflateError ;
206
207    # IO::File mode
208
209    print $z $string;
210    printf $z $format, $string;
211    tell $z
212    eof $z
213    seek $z, $position, $whence
214    binmode $z
215    fileno $z
216    close $z ;
217
218
219=head1 DESCRIPTION
220
221This module provides a Perl interface that allows writing compressed
222data to files or buffer as defined in RFC 1950.
223
224For reading RFC 1950 files/buffers, see the companion module
225L<IO::Uncompress::Inflate|IO::Uncompress::Inflate>.
226
227=head1 Functional Interface
228
229A top-level function, C<deflate>, is provided to carry out
230"one-shot" compression between buffers and/or files. For finer
231control over the compression process, see the L</"OO Interface">
232section.
233
234    use IO::Compress::Deflate qw(deflate $DeflateError) ;
235
236    deflate $input_filename_or_reference => $output_filename_or_reference [,OPTS]
237        or die "deflate failed: $DeflateError\n";
238
239The functional interface needs Perl5.005 or better.
240
241=head2 deflate $input_filename_or_reference => $output_filename_or_reference [, OPTS]
242
243C<deflate> expects at least two parameters,
244C<$input_filename_or_reference> and C<$output_filename_or_reference>.
245
246=head3 The C<$input_filename_or_reference> parameter
247
248The parameter, C<$input_filename_or_reference>, is used to define the
249source of the uncompressed data.
250
251It can take one of the following forms:
252
253=over 5
254
255=item A filename
256
257If the <$input_filename_or_reference> parameter is a simple scalar, it is
258assumed to be a filename. This file will be opened for reading and the
259input data will be read from it.
260
261=item A filehandle
262
263If the C<$input_filename_or_reference> parameter is a filehandle, the input
264data will be read from it.  The string '-' can be used as an alias for
265standard input.
266
267=item A scalar reference
268
269If C<$input_filename_or_reference> is a scalar reference, the input data
270will be read from C<$$input_filename_or_reference>.
271
272=item An array reference
273
274If C<$input_filename_or_reference> is an array reference, each element in
275the array must be a filename.
276
277The input data will be read from each file in turn.
278
279The complete array will be walked to ensure that it only
280contains valid filenames before any data is compressed.
281
282=item An Input FileGlob string
283
284If C<$input_filename_or_reference> is a string that is delimited by the
285characters "<" and ">" C<deflate> will assume that it is an
286I<input fileglob string>. The input is the list of files that match the
287fileglob.
288
289See L<File::GlobMapper|File::GlobMapper> for more details.
290
291=back
292
293If the C<$input_filename_or_reference> parameter is any other type,
294C<undef> will be returned.
295
296=head3 The C<$output_filename_or_reference> parameter
297
298The parameter C<$output_filename_or_reference> is used to control the
299destination of the compressed data. This parameter can take one of
300these forms.
301
302=over 5
303
304=item A filename
305
306If the C<$output_filename_or_reference> parameter is a simple scalar, it is
307assumed to be a filename.  This file will be opened for writing and the
308compressed data will be written to it.
309
310=item A filehandle
311
312If the C<$output_filename_or_reference> parameter is a filehandle, the
313compressed data will be written to it.  The string '-' can be used as
314an alias for standard output.
315
316=item A scalar reference
317
318If C<$output_filename_or_reference> is a scalar reference, the
319compressed data will be stored in C<$$output_filename_or_reference>.
320
321=item An Array Reference
322
323If C<$output_filename_or_reference> is an array reference,
324the compressed data will be pushed onto the array.
325
326=item An Output FileGlob
327
328If C<$output_filename_or_reference> is a string that is delimited by the
329characters "<" and ">" C<deflate> will assume that it is an
330I<output fileglob string>. The output is the list of files that match the
331fileglob.
332
333When C<$output_filename_or_reference> is an fileglob string,
334C<$input_filename_or_reference> must also be a fileglob string. Anything
335else is an error.
336
337See L<File::GlobMapper|File::GlobMapper> for more details.
338
339=back
340
341If the C<$output_filename_or_reference> parameter is any other type,
342C<undef> will be returned.
343
344=head2 Notes
345
346When C<$input_filename_or_reference> maps to multiple files/buffers and
347C<$output_filename_or_reference> is a single
348file/buffer the input files/buffers will be stored
349in C<$output_filename_or_reference> as a concatenated series of compressed data streams.
350
351=head2 Optional Parameters
352
353Unless specified below, the optional parameters for C<deflate>,
354C<OPTS>, are the same as those used with the OO interface defined in the
355L</"Constructor Options"> section below.
356
357=over 5
358
359=item C<< AutoClose => 0|1 >>
360
361This option applies to any input or output data streams to
362C<deflate> that are filehandles.
363
364If C<AutoClose> is specified, and the value is true, it will result in all
365input and/or output filehandles being closed once C<deflate> has
366completed.
367
368This parameter defaults to 0.
369
370=item C<< BinModeIn => 0|1 >>
371
372When reading from a file or filehandle, set C<binmode> before reading.
373
374Defaults to 0.
375
376=item C<< Append => 0|1 >>
377
378The behaviour of this option is dependent on the type of output data
379stream.
380
381=over 5
382
383=item * A Buffer
384
385If C<Append> is enabled, all compressed data will be append to the end of
386the output buffer. Otherwise the output buffer will be cleared before any
387compressed data is written to it.
388
389=item * A Filename
390
391If C<Append> is enabled, the file will be opened in append mode. Otherwise
392the contents of the file, if any, will be truncated before any compressed
393data is written to it.
394
395=item * A Filehandle
396
397If C<Append> is enabled, the filehandle will be positioned to the end of
398the file via a call to C<seek> before any compressed data is
399written to it.  Otherwise the file pointer will not be moved.
400
401=back
402
403When C<Append> is specified, and set to true, it will I<append> all compressed
404data to the output data stream.
405
406So when the output is a filehandle it will carry out a seek to the eof
407before writing any compressed data. If the output is a filename, it will be opened for
408appending. If the output is a buffer, all compressed data will be
409appended to the existing buffer.
410
411Conversely when C<Append> is not specified, or it is present and is set to
412false, it will operate as follows.
413
414When the output is a filename, it will truncate the contents of the file
415before writing any compressed data. If the output is a filehandle
416its position will not be changed. If the output is a buffer, it will be
417wiped before any compressed data is output.
418
419Defaults to 0.
420
421=back
422
423=head2 Examples
424
425To read the contents of the file C<file1.txt> and write the compressed
426data to the file C<file1.txt.1950>.
427
428    use strict ;
429    use warnings ;
430    use IO::Compress::Deflate qw(deflate $DeflateError) ;
431
432    my $input = "file1.txt";
433    deflate $input => "$input.1950"
434        or die "deflate failed: $DeflateError\n";
435
436To read from an existing Perl filehandle, C<$input>, and write the
437compressed data to a buffer, C<$buffer>.
438
439    use strict ;
440    use warnings ;
441    use IO::Compress::Deflate qw(deflate $DeflateError) ;
442    use IO::File ;
443
444    my $input = new IO::File "<file1.txt"
445        or die "Cannot open 'file1.txt': $!\n" ;
446    my $buffer ;
447    deflate $input => \$buffer
448        or die "deflate failed: $DeflateError\n";
449
450To compress all files in the directory "/my/home" that match "*.txt"
451and store the compressed data in the same directory
452
453    use strict ;
454    use warnings ;
455    use IO::Compress::Deflate qw(deflate $DeflateError) ;
456
457    deflate '</my/home/*.txt>' => '<*.1950>'
458        or die "deflate failed: $DeflateError\n";
459
460and if you want to compress each file one at a time, this will do the trick
461
462    use strict ;
463    use warnings ;
464    use IO::Compress::Deflate qw(deflate $DeflateError) ;
465
466    for my $input ( glob "/my/home/*.txt" )
467    {
468        my $output = "$input.1950" ;
469        deflate $input => $output
470            or die "Error compressing '$input': $DeflateError\n";
471    }
472
473=head1 OO Interface
474
475=head2 Constructor
476
477The format of the constructor for C<IO::Compress::Deflate> is shown below
478
479    my $z = new IO::Compress::Deflate $output [,OPTS]
480        or die "IO::Compress::Deflate failed: $DeflateError\n";
481
482It returns an C<IO::Compress::Deflate> object on success and undef on failure.
483The variable C<$DeflateError> will contain an error message on failure.
484
485If you are running Perl 5.005 or better the object, C<$z>, returned from
486IO::Compress::Deflate can be used exactly like an L<IO::File|IO::File> filehandle.
487This means that all normal output file operations can be carried out
488with C<$z>.
489For example, to write to a compressed file/buffer you can use either of
490these forms
491
492    $z->print("hello world\n");
493    print $z "hello world\n";
494
495The mandatory parameter C<$output> is used to control the destination
496of the compressed data. This parameter can take one of these forms.
497
498=over 5
499
500=item A filename
501
502If the C<$output> parameter is a simple scalar, it is assumed to be a
503filename. This file will be opened for writing and the compressed data
504will be written to it.
505
506=item A filehandle
507
508If the C<$output> parameter is a filehandle, the compressed data will be
509written to it.
510The string '-' can be used as an alias for standard output.
511
512=item A scalar reference
513
514If C<$output> is a scalar reference, the compressed data will be stored
515in C<$$output>.
516
517=back
518
519If the C<$output> parameter is any other type, C<IO::Compress::Deflate>::new will
520return undef.
521
522=head2 Constructor Options
523
524C<OPTS> is any combination of the following options:
525
526=over 5
527
528=item C<< AutoClose => 0|1 >>
529
530This option is only valid when the C<$output> parameter is a filehandle. If
531specified, and the value is true, it will result in the C<$output> being
532closed once either the C<close> method is called or the C<IO::Compress::Deflate>
533object is destroyed.
534
535This parameter defaults to 0.
536
537=item C<< Append => 0|1 >>
538
539Opens C<$output> in append mode.
540
541The behaviour of this option is dependent on the type of C<$output>.
542
543=over 5
544
545=item * A Buffer
546
547If C<$output> is a buffer and C<Append> is enabled, all compressed data
548will be append to the end of C<$output>. Otherwise C<$output> will be
549cleared before any data is written to it.
550
551=item * A Filename
552
553If C<$output> is a filename and C<Append> is enabled, the file will be
554opened in append mode. Otherwise the contents of the file, if any, will be
555truncated before any compressed data is written to it.
556
557=item * A Filehandle
558
559If C<$output> is a filehandle, the file pointer will be positioned to the
560end of the file via a call to C<seek> before any compressed data is written
561to it.  Otherwise the file pointer will not be moved.
562
563=back
564
565This parameter defaults to 0.
566
567=item C<< Merge => 0|1 >>
568
569This option is used to compress input data and append it to an existing
570compressed data stream in C<$output>. The end result is a single compressed
571data stream stored in C<$output>.
572
573It is a fatal error to attempt to use this option when C<$output> is not an
574RFC 1950 data stream.
575
576There are a number of other limitations with the C<Merge> option:
577
578=over 5
579
580=item 1
581
582This module needs to have been built with zlib 1.2.1 or better to work. A
583fatal error will be thrown if C<Merge> is used with an older version of
584zlib.
585
586=item 2
587
588If C<$output> is a file or a filehandle, it must be seekable.
589
590=back
591
592This parameter defaults to 0.
593
594=item -Level
595
596Defines the compression level used by zlib. The value should either be
597a number between 0 and 9 (0 means no compression and 9 is maximum
598compression), or one of the symbolic constants defined below.
599
600   Z_NO_COMPRESSION
601   Z_BEST_SPEED
602   Z_BEST_COMPRESSION
603   Z_DEFAULT_COMPRESSION
604
605The default is Z_DEFAULT_COMPRESSION.
606
607Note, these constants are not imported by C<IO::Compress::Deflate> by default.
608
609    use IO::Compress::Deflate qw(:strategy);
610    use IO::Compress::Deflate qw(:constants);
611    use IO::Compress::Deflate qw(:all);
612
613=item -Strategy
614
615Defines the strategy used to tune the compression. Use one of the symbolic
616constants defined below.
617
618   Z_FILTERED
619   Z_HUFFMAN_ONLY
620   Z_RLE
621   Z_FIXED
622   Z_DEFAULT_STRATEGY
623
624The default is Z_DEFAULT_STRATEGY.
625
626=item C<< Strict => 0|1 >>
627
628This is a placeholder option.
629
630=back
631
632=head2 Examples
633
634TODO
635
636=head1 Methods
637
638=head2 print
639
640Usage is
641
642    $z->print($data)
643    print $z $data
644
645Compresses and outputs the contents of the C<$data> parameter. This
646has the same behaviour as the C<print> built-in.
647
648Returns true if successful.
649
650=head2 printf
651
652Usage is
653
654    $z->printf($format, $data)
655    printf $z $format, $data
656
657Compresses and outputs the contents of the C<$data> parameter.
658
659Returns true if successful.
660
661=head2 syswrite
662
663Usage is
664
665    $z->syswrite $data
666    $z->syswrite $data, $length
667    $z->syswrite $data, $length, $offset
668
669Compresses and outputs the contents of the C<$data> parameter.
670
671Returns the number of uncompressed bytes written, or C<undef> if
672unsuccessful.
673
674=head2 write
675
676Usage is
677
678    $z->write $data
679    $z->write $data, $length
680    $z->write $data, $length, $offset
681
682Compresses and outputs the contents of the C<$data> parameter.
683
684Returns the number of uncompressed bytes written, or C<undef> if
685unsuccessful.
686
687=head2 flush
688
689Usage is
690
691    $z->flush;
692    $z->flush($flush_type);
693
694Flushes any pending compressed data to the output file/buffer.
695
696This method takes an optional parameter, C<$flush_type>, that controls
697how the flushing will be carried out. By default the C<$flush_type>
698used is C<Z_FINISH>. Other valid values for C<$flush_type> are
699C<Z_NO_FLUSH>, C<Z_SYNC_FLUSH>, C<Z_FULL_FLUSH> and C<Z_BLOCK>. It is
700strongly recommended that you only set the C<flush_type> parameter if
701you fully understand the implications of what it does - overuse of C<flush>
702can seriously degrade the level of compression achieved. See the C<zlib>
703documentation for details.
704
705Returns true on success.
706
707=head2 tell
708
709Usage is
710
711    $z->tell()
712    tell $z
713
714Returns the uncompressed file offset.
715
716=head2 eof
717
718Usage is
719
720    $z->eof();
721    eof($z);
722
723Returns true if the C<close> method has been called.
724
725=head2 seek
726
727    $z->seek($position, $whence);
728    seek($z, $position, $whence);
729
730Provides a sub-set of the C<seek> functionality, with the restriction
731that it is only legal to seek forward in the output file/buffer.
732It is a fatal error to attempt to seek backward.
733
734Empty parts of the file/buffer will have NULL (0x00) bytes written to them.
735
736The C<$whence> parameter takes one the usual values, namely SEEK_SET,
737SEEK_CUR or SEEK_END.
738
739Returns 1 on success, 0 on failure.
740
741=head2 binmode
742
743Usage is
744
745    $z->binmode
746    binmode $z ;
747
748This is a noop provided for completeness.
749
750=head2 opened
751
752    $z->opened()
753
754Returns true if the object currently refers to a opened file/buffer.
755
756=head2 autoflush
757
758    my $prev = $z->autoflush()
759    my $prev = $z->autoflush(EXPR)
760
761If the C<$z> object is associated with a file or a filehandle, this method
762returns the current autoflush setting for the underlying filehandle. If
763C<EXPR> is present, and is non-zero, it will enable flushing after every
764write/print operation.
765
766If C<$z> is associated with a buffer, this method has no effect and always
767returns C<undef>.
768
769B<Note> that the special variable C<$|> B<cannot> be used to set or
770retrieve the autoflush setting.
771
772=head2 input_line_number
773
774    $z->input_line_number()
775    $z->input_line_number(EXPR)
776
777This method always returns C<undef> when compressing.
778
779=head2 fileno
780
781    $z->fileno()
782    fileno($z)
783
784If the C<$z> object is associated with a file or a filehandle, C<fileno>
785will return the underlying file descriptor. Once the C<close> method is
786called C<fileno> will return C<undef>.
787
788If the C<$z> object is associated with a buffer, this method will return
789C<undef>.
790
791=head2 close
792
793    $z->close() ;
794    close $z ;
795
796Flushes any pending compressed data and then closes the output file/buffer.
797
798For most versions of Perl this method will be automatically invoked if
799the IO::Compress::Deflate object is destroyed (either explicitly or by the
800variable with the reference to the object going out of scope). The
801exceptions are Perl versions 5.005 through 5.00504 and 5.8.0. In
802these cases, the C<close> method will be called automatically, but
803not until global destruction of all live objects when the program is
804terminating.
805
806Therefore, if you want your scripts to be able to run on all versions
807of Perl, you should call C<close> explicitly and not rely on automatic
808closing.
809
810Returns true on success, otherwise 0.
811
812If the C<AutoClose> option has been enabled when the IO::Compress::Deflate
813object was created, and the object is associated with a file, the
814underlying file will also be closed.
815
816=head2 newStream([OPTS])
817
818Usage is
819
820    $z->newStream( [OPTS] )
821
822Closes the current compressed data stream and starts a new one.
823
824OPTS consists of any of the options that are available when creating
825the C<$z> object.
826
827See the L</"Constructor Options"> section for more details.
828
829=head2 deflateParams
830
831Usage is
832
833    $z->deflateParams
834
835TODO
836
837=head1 Importing
838
839A number of symbolic constants are required by some methods in
840C<IO::Compress::Deflate>. None are imported by default.
841
842=over 5
843
844=item :all
845
846Imports C<deflate>, C<$DeflateError> and all symbolic
847constants that can be used by C<IO::Compress::Deflate>. Same as doing this
848
849    use IO::Compress::Deflate qw(deflate $DeflateError :constants) ;
850
851=item :constants
852
853Import all symbolic constants. Same as doing this
854
855    use IO::Compress::Deflate qw(:flush :level :strategy) ;
856
857=item :flush
858
859These symbolic constants are used by the C<flush> method.
860
861    Z_NO_FLUSH
862    Z_PARTIAL_FLUSH
863    Z_SYNC_FLUSH
864    Z_FULL_FLUSH
865    Z_FINISH
866    Z_BLOCK
867
868=item :level
869
870These symbolic constants are used by the C<Level> option in the constructor.
871
872    Z_NO_COMPRESSION
873    Z_BEST_SPEED
874    Z_BEST_COMPRESSION
875    Z_DEFAULT_COMPRESSION
876
877=item :strategy
878
879These symbolic constants are used by the C<Strategy> option in the constructor.
880
881    Z_FILTERED
882    Z_HUFFMAN_ONLY
883    Z_RLE
884    Z_FIXED
885    Z_DEFAULT_STRATEGY
886
887
888
889
890=back
891
892=head1 EXAMPLES
893
894=head2 Apache::GZip Revisited
895
896See L<IO::Compress::FAQ|IO::Compress::FAQ/"Apache::GZip Revisited">
897
898=head2 Working with Net::FTP
899
900See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP">
901
902=head1 SEE ALSO
903
904L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress>
905
906L<IO::Compress::FAQ|IO::Compress::FAQ>
907
908L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>,
909L<Archive::Tar|Archive::Tar>,
910L<IO::Zlib|IO::Zlib>
911
912For RFC 1950, 1951 and 1952 see
913F<http://www.faqs.org/rfcs/rfc1950.html>,
914F<http://www.faqs.org/rfcs/rfc1951.html> and
915F<http://www.faqs.org/rfcs/rfc1952.html>
916
917The I<zlib> compression library was written by Jean-loup Gailly
918F<gzip@prep.ai.mit.edu> and Mark Adler F<madler@alumni.caltech.edu>.
919
920The primary site for the I<zlib> compression library is
921F<http://www.zlib.org>.
922
923The primary site for gzip is F<http://www.gzip.org>.
924
925=head1 AUTHOR
926
927This module was written by Paul Marquess, F<pmqs@cpan.org>.
928
929=head1 MODIFICATION HISTORY
930
931See the Changes file.
932
933=head1 COPYRIGHT AND LICENSE
934
935Copyright (c) 2005-2014 Paul Marquess. All rights reserved.
936
937This program is free software; you can redistribute it and/or
938modify it under the same terms as Perl itself.
939
940