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