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