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