1IO::Compress::Gzip(3) User Contributed Perl DocumentationIO::Compress::Gzip(3)
2
3
4

NAME

6       IO::Compress::Gzip - Write RFC 1952 files/buffers
7

SYNOPSIS

9           use IO::Compress::Gzip qw(gzip $GzipError) ;
10
11           my $status = gzip $input => $output [,OPTS]
12               or die "gzip failed: $GzipError\n";
13
14           my $z = IO::Compress::Gzip->new( $output [,OPTS] )
15               or die "gzip failed: $GzipError\n";
16
17           $z->print($string);
18           $z->printf($format, $string);
19           $z->write($string);
20           $z->syswrite($string [, $length, $offset]);
21           $z->flush();
22           $z->tell();
23           $z->eof();
24           $z->seek($position, $whence);
25           $z->binmode();
26           $z->fileno();
27           $z->opened();
28           $z->autoflush();
29           $z->input_line_number();
30           $z->newStream( [OPTS] );
31
32           $z->deflateParams();
33
34           $z->close() ;
35
36           $GzipError ;
37
38           # IO::File mode
39
40           print $z $string;
41           printf $z $format, $string;
42           tell $z
43           eof $z
44           seek $z, $position, $whence
45           binmode $z
46           fileno $z
47           close $z ;
48

DESCRIPTION

50       This module provides a Perl interface that allows writing compressed
51       data to files or buffer as defined in RFC 1952.
52
53       All the gzip headers defined in RFC 1952 can be created using this
54       module.
55
56       For reading RFC 1952 files/buffers, see the companion module
57       IO::Uncompress::Gunzip.
58

Functional Interface

60       A top-level function, "gzip", is provided to carry out "one-shot"
61       compression between buffers and/or files. For finer control over the
62       compression process, see the "OO Interface" section.
63
64           use IO::Compress::Gzip qw(gzip $GzipError) ;
65
66           gzip $input_filename_or_reference => $output_filename_or_reference [,OPTS]
67               or die "gzip failed: $GzipError\n";
68
69       The functional interface needs Perl5.005 or better.
70
71   gzip $input_filename_or_reference => $output_filename_or_reference [, OPTS]
72       "gzip" expects at least two parameters, $input_filename_or_reference
73       and $output_filename_or_reference and zero or more optional parameters
74       (see "Optional Parameters")
75
76       The $input_filename_or_reference parameter
77
78       The parameter, $input_filename_or_reference, is used to define the
79       source of the uncompressed data.
80
81       It can take one of the following forms:
82
83       A filename
84            If the $input_filename_or_reference parameter is a simple scalar,
85            it is assumed to be a filename. This file will be opened for
86            reading and the input data will be read from it.
87
88       A filehandle
89            If the $input_filename_or_reference parameter is a filehandle, the
90            input data will be read from it.  The string '-' can be used as an
91            alias for standard input.
92
93       A scalar reference
94            If $input_filename_or_reference is a scalar reference, the input
95            data will be read from $$input_filename_or_reference.
96
97       An array reference
98            If $input_filename_or_reference is an array reference, each
99            element in the array must be a filename.
100
101            The input data will be read from each file in turn.
102
103            The complete array will be walked to ensure that it only contains
104            valid filenames before any data is compressed.
105
106       An Input FileGlob string
107            If $input_filename_or_reference is a string that is delimited by
108            the characters "<" and ">" "gzip" will assume that it is an input
109            fileglob string. The input is the list of files that match the
110            fileglob.
111
112            See File::GlobMapper for more details.
113
114       If the $input_filename_or_reference parameter is any other type,
115       "undef" will be returned.
116
117       In addition, if $input_filename_or_reference is a simple filename, the
118       default values for the "Name" and "Time" options will be sourced from
119       that file.
120
121       If you do not want to use these defaults they can be overridden by
122       explicitly setting the "Name" and "Time" options or by setting the
123       "Minimal" parameter.
124
125       The $output_filename_or_reference parameter
126
127       The parameter $output_filename_or_reference is used to control the
128       destination of the compressed data. This parameter can take one of
129       these forms.
130
131       A filename
132            If the $output_filename_or_reference parameter is a simple scalar,
133            it is assumed to be a filename.  This file will be opened for
134            writing and the compressed data will be written to it.
135
136       A filehandle
137            If the $output_filename_or_reference parameter is a filehandle,
138            the compressed data will be written to it.  The string '-' can be
139            used as an alias for standard output.
140
141       A scalar reference
142            If $output_filename_or_reference is a scalar reference, the
143            compressed data will be stored in $$output_filename_or_reference.
144
145       An Array Reference
146            If $output_filename_or_reference is an array reference, the
147            compressed data will be pushed onto the array.
148
149       An Output FileGlob
150            If $output_filename_or_reference is a string that is delimited by
151            the characters "<" and ">" "gzip" will assume that it is an output
152            fileglob string. The output is the list of files that match the
153            fileglob.
154
155            When $output_filename_or_reference is an fileglob string,
156            $input_filename_or_reference must also be a fileglob string.
157            Anything else is an error.
158
159            See File::GlobMapper for more details.
160
161       If the $output_filename_or_reference parameter is any other type,
162       "undef" will be returned.
163
164   Notes
165       When $input_filename_or_reference maps to multiple files/buffers and
166       $output_filename_or_reference is a single file/buffer the input
167       files/buffers will be stored in $output_filename_or_reference as a
168       concatenated series of compressed data streams.
169
170   Optional Parameters
171       The optional parameters for the one-shot function "gzip" are (for the
172       most part) identical to those used with the OO interface defined in the
173       "Constructor Options" section. The exceptions are listed below
174
175       "AutoClose => 0|1"
176            This option applies to any input or output data streams to "gzip"
177            that are filehandles.
178
179            If "AutoClose" is specified, and the value is true, it will result
180            in all input and/or output filehandles being closed once "gzip"
181            has completed.
182
183            This parameter defaults to 0.
184
185       "BinModeIn => 0|1"
186            This option is now a no-op. All files will be read in binmode.
187
188       "Append => 0|1"
189            The behaviour of this option is dependent on the type of output
190            data stream.
191
192            •    A Buffer
193
194                 If "Append" is enabled, all compressed data will be append to
195                 the end of the output buffer. Otherwise the output buffer
196                 will be cleared before any compressed data is written to it.
197
198            •    A Filename
199
200                 If "Append" is enabled, the file will be opened in append
201                 mode. Otherwise the contents of the file, if any, will be
202                 truncated before any compressed data is written to it.
203
204            •    A Filehandle
205
206                 If "Append" is enabled, the filehandle will be positioned to
207                 the end of the file via a call to "seek" before any
208                 compressed data is written to it.  Otherwise the file pointer
209                 will not be moved.
210
211            When "Append" is specified, and set to true, it will append all
212            compressed data to the output data stream.
213
214            So when the output is a filehandle it will carry out a seek to the
215            eof before writing any compressed data. If the output is a
216            filename, it will be opened for appending. If the output is a
217            buffer, all compressed data will be appended to the existing
218            buffer.
219
220            Conversely when "Append" is not specified, or it is present and is
221            set to false, it will operate as follows.
222
223            When the output is a filename, it will truncate the contents of
224            the file before writing any compressed data. If the output is a
225            filehandle its position will not be changed. If the output is a
226            buffer, it will be wiped before any compressed data is output.
227
228            Defaults to 0.
229
230   Examples
231       Here are a few example that show the capabilities of the module.
232
233       Streaming
234
235       This very simple command line example demonstrates the streaming
236       capabilities of the module.  The code reads data from STDIN, compresses
237       it, and writes the compressed data to STDOUT.
238
239           $ echo hello world | perl -MIO::Compress::Gzip=gzip -e 'gzip \*STDIN => \*STDOUT' >output.gz
240
241       The special filename "-" can be used as a standin for both "\*STDIN"
242       and "\*STDOUT", so the above can be rewritten as
243
244           $ echo hello world | perl -MIO::Compress::Gzip=gzip -e 'gzip "-" => "-"' >output.gz
245
246       Compressing a file from the filesystem
247
248       To read the contents of the file "file1.txt" and write the compressed
249       data to the file "file1.txt.gz".
250
251           use strict ;
252           use warnings ;
253           use IO::Compress::Gzip qw(gzip $GzipError) ;
254
255           my $input = "file1.txt";
256           gzip $input => "$input.gz"
257               or die "gzip failed: $GzipError\n";
258
259       Reading from a Filehandle and writing to an in-memory buffer
260
261       To read from an existing Perl filehandle, $input, and write the
262       compressed data to a buffer, $buffer.
263
264           use strict ;
265           use warnings ;
266           use IO::Compress::Gzip qw(gzip $GzipError) ;
267           use IO::File ;
268
269           my $input = IO::File->new( "<file1.txt" )
270               or die "Cannot open 'file1.txt': $!\n" ;
271           my $buffer ;
272           gzip $input => \$buffer
273               or die "gzip failed: $GzipError\n";
274
275       Compressing multiple files
276
277       To compress all files in the directory "/my/home" that match "*.txt"
278       and store the compressed data in the same directory
279
280           use strict ;
281           use warnings ;
282           use IO::Compress::Gzip qw(gzip $GzipError) ;
283
284           gzip '</my/home/*.txt>' => '<*.gz>'
285               or die "gzip failed: $GzipError\n";
286
287       and if you want to compress each file one at a time, this will do the
288       trick
289
290           use strict ;
291           use warnings ;
292           use IO::Compress::Gzip qw(gzip $GzipError) ;
293
294           for my $input ( glob "/my/home/*.txt" )
295           {
296               my $output = "$input.gz" ;
297               gzip $input => $output
298                   or die "Error compressing '$input': $GzipError\n";
299           }
300

OO Interface

302   Constructor
303       The format of the constructor for "IO::Compress::Gzip" is shown below
304
305           my $z = IO::Compress::Gzip->new( $output [,OPTS] )
306               or die "IO::Compress::Gzip failed: $GzipError\n";
307
308       It returns an "IO::Compress::Gzip" object on success and undef on
309       failure.  The variable $GzipError will contain an error message on
310       failure.
311
312       If you are running Perl 5.005 or better the object, $z, returned from
313       IO::Compress::Gzip can be used exactly like an IO::File filehandle.
314       This means that all normal output file operations can be carried out
315       with $z.  For example, to write to a compressed file/buffer you can use
316       either of these forms
317
318           $z->print("hello world\n");
319           print $z "hello world\n";
320
321       The mandatory parameter $output is used to control the destination of
322       the compressed data. This parameter can take one of these forms.
323
324       A filename
325            If the $output parameter is a simple scalar, it is assumed to be a
326            filename. This file will be opened for writing and the compressed
327            data will be written to it.
328
329       A filehandle
330            If the $output parameter is a filehandle, the compressed data will
331            be written to it.  The string '-' can be used as an alias for
332            standard output.
333
334       A scalar reference
335            If $output is a scalar reference, the compressed data will be
336            stored in $$output.
337
338       If the $output parameter is any other type, "IO::Compress::Gzip"::new
339       will return undef.
340
341   Constructor Options
342       "OPTS" is any combination of zero or more the following options:
343
344       "AutoClose => 0|1"
345            This option is only valid when the $output parameter is a
346            filehandle. If specified, and the value is true, it will result in
347            the $output being closed once either the "close" method is called
348            or the "IO::Compress::Gzip" object is destroyed.
349
350            This parameter defaults to 0.
351
352       "Append => 0|1"
353            Opens $output in append mode.
354
355            The behaviour of this option is dependent on the type of $output.
356
357            •    A Buffer
358
359                 If $output is a buffer and "Append" is enabled, all
360                 compressed data will be append to the end of $output.
361                 Otherwise $output will be cleared before any data is written
362                 to it.
363
364            •    A Filename
365
366                 If $output is a filename and "Append" is enabled, the file
367                 will be opened in append mode. Otherwise the contents of the
368                 file, if any, will be truncated before any compressed data is
369                 written to it.
370
371            •    A Filehandle
372
373                 If $output is a filehandle, the file pointer will be
374                 positioned to the end of the file via a call to "seek" before
375                 any compressed data is written to it.  Otherwise the file
376                 pointer will not be moved.
377
378            This parameter defaults to 0.
379
380       "Merge => 0|1"
381            This option is used to compress input data and append it to an
382            existing compressed data stream in $output. The end result is a
383            single compressed data stream stored in $output.
384
385            It is a fatal error to attempt to use this option when $output is
386            not an RFC 1952 data stream.
387
388            There are a number of other limitations with the "Merge" option:
389
390            1.   This module needs to have been built with zlib 1.2.1 or
391                 better to work. A fatal error will be thrown if "Merge" is
392                 used with an older version of zlib.
393
394            2.   If $output is a file or a filehandle, it must be seekable.
395
396            This parameter defaults to 0.
397
398       -Level
399            Defines the compression level used by zlib. The value should
400            either be a number between 0 and 9 (0 means no compression and 9
401            is maximum compression), or one of the symbolic constants defined
402            below.
403
404               Z_NO_COMPRESSION
405               Z_BEST_SPEED
406               Z_BEST_COMPRESSION
407               Z_DEFAULT_COMPRESSION
408
409            The default is Z_DEFAULT_COMPRESSION.
410
411            Note, these constants are not imported by "IO::Compress::Gzip" by
412            default.
413
414                use IO::Compress::Gzip qw(:strategy);
415                use IO::Compress::Gzip qw(:constants);
416                use IO::Compress::Gzip qw(:all);
417
418       -Strategy
419            Defines the strategy used to tune the compression. Use one of the
420            symbolic constants defined below.
421
422               Z_FILTERED
423               Z_HUFFMAN_ONLY
424               Z_RLE
425               Z_FIXED
426               Z_DEFAULT_STRATEGY
427
428            The default is Z_DEFAULT_STRATEGY.
429
430       "Minimal => 0|1"
431            If specified, this option will force the creation of the smallest
432            possible compliant gzip header (which is exactly 10 bytes long) as
433            defined in RFC 1952.
434
435            See the section titled "Compliance" in RFC 1952 for a definition
436            of the values used for the fields in the gzip header.
437
438            All other parameters that control the content of the gzip header
439            will be ignored if this parameter is set to 1.
440
441            This parameter defaults to 0.
442
443       "Comment => $comment"
444            Stores the contents of $comment in the COMMENT field in the gzip
445            header.  By default, no comment field is written to the gzip file.
446
447            If the "-Strict" option is enabled, the comment can only consist
448            of ISO 8859-1 characters plus line feed.
449
450            If the "-Strict" option is disabled, the comment field can contain
451            any character except NULL. If any null characters are present, the
452            field will be truncated at the first NULL.
453
454       "Name => $string"
455            Stores the contents of $string in the gzip NAME header field. If
456            "Name" is not specified, no gzip NAME field will be created.
457
458            If the "-Strict" option is enabled, $string can only consist of
459            ISO 8859-1 characters.
460
461            If "-Strict" is disabled, then $string can contain any character
462            except NULL. If any null characters are present, the field will be
463            truncated at the first NULL.
464
465       "Time => $number"
466            Sets the MTIME field in the gzip header to $number.
467
468            This field defaults to the time the "IO::Compress::Gzip" object
469            was created if this option is not specified.
470
471       "TextFlag => 0|1"
472            This parameter controls the setting of the FLG.FTEXT bit in the
473            gzip header. It is used to signal that the data stored in the gzip
474            file/buffer is probably text.
475
476            The default is 0.
477
478       "HeaderCRC => 0|1"
479            When true this parameter will set the FLG.FHCRC bit to 1 in the
480            gzip header and set the CRC16 header field to the CRC of the
481            complete gzip header except the CRC16 field itself.
482
483            Note that gzip files created with the "HeaderCRC" flag set to 1
484            cannot be read by most, if not all, of the standard gunzip
485            utilities, most notably gzip version 1.2.4. You should therefore
486            avoid using this option if you want to maximize the portability of
487            your gzip files.
488
489            This parameter defaults to 0.
490
491       "OS_Code => $value"
492            Stores $value in the gzip OS header field. A number between 0 and
493            255 is valid.
494
495            If not specified, this parameter defaults to the OS code of the
496            Operating System this module was built on. The value 3 is used as
497            a catch-all for all Unix variants and unknown Operating Systems.
498
499       "ExtraField => $data"
500            This parameter allows additional metadata to be stored in the
501            ExtraField in the gzip header. An RFC 1952 compliant ExtraField
502            consists of zero or more subfields. Each subfield consists of a
503            two byte header followed by the subfield data.
504
505            The list of subfields can be supplied in any of the following
506            formats
507
508                -ExtraField => [$id1, $data1,
509                                $id2, $data2,
510                                 ...
511                               ]
512                -ExtraField => [ [$id1 => $data1],
513                                 [$id2 => $data2],
514                                 ...
515                               ]
516                -ExtraField => { $id1 => $data1,
517                                 $id2 => $data2,
518                                 ...
519                               }
520
521            Where $id1, $id2 are two byte subfield ID's. The second byte of
522            the ID cannot be 0, unless the "Strict" option has been disabled.
523
524            If you use the hash syntax, you have no control over the order in
525            which the ExtraSubFields are stored, plus you cannot have
526            SubFields with duplicate ID.
527
528            Alternatively the list of subfields can by supplied as a scalar,
529            thus
530
531                -ExtraField => $rawdata
532
533            If you use the raw format, and the "Strict" option is enabled,
534            "IO::Compress::Gzip" will check that $rawdata consists of zero or
535            more conformant sub-fields. When "Strict" is disabled, $rawdata
536            can consist of any arbitrary byte stream.
537
538            The maximum size of the Extra Field 65535 bytes.
539
540       "ExtraFlags => $value"
541            Sets the XFL byte in the gzip header to $value.
542
543            If this option is not present, the value stored in XFL field will
544            be determined by the setting of the "Level" option.
545
546            If "Level => Z_BEST_SPEED" has been specified then XFL is set to
547            2.  If "Level => Z_BEST_COMPRESSION" has been specified then XFL
548            is set to 4.  Otherwise XFL is set to 0.
549
550       "Strict => 0|1"
551            "Strict" will optionally police the values supplied with other
552            options to ensure they are compliant with RFC1952.
553
554            This option is enabled by default.
555
556            If "Strict" is enabled the following behaviour will be policed:
557
558            •    The value supplied with the "Name" option can only contain
559                 ISO 8859-1 characters.
560
561            •    The value supplied with the "Comment" option can only contain
562                 ISO 8859-1 characters plus line-feed.
563
564            •    The values supplied with the "-Name" and "-Comment" options
565                 cannot contain multiple embedded nulls.
566
567            •    If an "ExtraField" option is specified and it is a simple
568                 scalar, it must conform to the sub-field structure as defined
569                 in RFC 1952.
570
571            •    If an "ExtraField" option is specified the second byte of the
572                 ID will be checked in each subfield to ensure that it does
573                 not contain the reserved value 0x00.
574
575            When "Strict" is disabled the following behaviour will be policed:
576
577            •    The value supplied with "-Name" option can contain any
578                 character except NULL.
579
580            •    The value supplied with "-Comment" option can contain any
581                 character except NULL.
582
583            •    The values supplied with the "-Name" and "-Comment" options
584                 can contain multiple embedded nulls. The string written to
585                 the gzip header will consist of the characters up to, but not
586                 including, the first embedded NULL.
587
588            •    If an "ExtraField" option is specified and it is a simple
589                 scalar, the structure will not be checked. The only error is
590                 if the length is too big.
591
592            •    The ID header in an "ExtraField" sub-field can consist of any
593                 two bytes.
594
595   Examples
596       TODO
597

Methods

599   print
600       Usage is
601
602           $z->print($data)
603           print $z $data
604
605       Compresses and outputs the contents of the $data parameter. This has
606       the same behaviour as the "print" built-in.
607
608       Returns true if successful.
609
610   printf
611       Usage is
612
613           $z->printf($format, $data)
614           printf $z $format, $data
615
616       Compresses and outputs the contents of the $data parameter.
617
618       Returns true if successful.
619
620   syswrite
621       Usage is
622
623           $z->syswrite $data
624           $z->syswrite $data, $length
625           $z->syswrite $data, $length, $offset
626
627       Compresses and outputs the contents of the $data parameter.
628
629       Returns the number of uncompressed bytes written, or "undef" if
630       unsuccessful.
631
632   write
633       Usage is
634
635           $z->write $data
636           $z->write $data, $length
637           $z->write $data, $length, $offset
638
639       Compresses and outputs the contents of the $data parameter.
640
641       Returns the number of uncompressed bytes written, or "undef" if
642       unsuccessful.
643
644   flush
645       Usage is
646
647           $z->flush;
648           $z->flush($flush_type);
649
650       Flushes any pending compressed data to the output file/buffer.
651
652       This method takes an optional parameter, $flush_type, that controls how
653       the flushing will be carried out. By default the $flush_type used is
654       "Z_FINISH". Other valid values for $flush_type are "Z_NO_FLUSH",
655       "Z_SYNC_FLUSH", "Z_FULL_FLUSH" and "Z_BLOCK". It is strongly
656       recommended that you only set the "flush_type" parameter if you fully
657       understand the implications of what it does - overuse of "flush" can
658       seriously degrade the level of compression achieved. See the "zlib"
659       documentation for details.
660
661       Returns true on success.
662
663   tell
664       Usage is
665
666           $z->tell()
667           tell $z
668
669       Returns the uncompressed file offset.
670
671   eof
672       Usage is
673
674           $z->eof();
675           eof($z);
676
677       Returns true if the "close" method has been called.
678
679   seek
680           $z->seek($position, $whence);
681           seek($z, $position, $whence);
682
683       Provides a sub-set of the "seek" functionality, with the restriction
684       that it is only legal to seek forward in the output file/buffer.  It is
685       a fatal error to attempt to seek backward.
686
687       Empty parts of the file/buffer will have NULL (0x00) bytes written to
688       them.
689
690       The $whence parameter takes one the usual values, namely SEEK_SET,
691       SEEK_CUR or SEEK_END.
692
693       Returns 1 on success, 0 on failure.
694
695   binmode
696       Usage is
697
698           $z->binmode
699           binmode $z ;
700
701       This is a noop provided for completeness.
702
703   opened
704           $z->opened()
705
706       Returns true if the object currently refers to a opened file/buffer.
707
708   autoflush
709           my $prev = $z->autoflush()
710           my $prev = $z->autoflush(EXPR)
711
712       If the $z object is associated with a file or a filehandle, this method
713       returns the current autoflush setting for the underlying filehandle. If
714       "EXPR" is present, and is non-zero, it will enable flushing after every
715       write/print operation.
716
717       If $z is associated with a buffer, this method has no effect and always
718       returns "undef".
719
720       Note that the special variable $| cannot be used to set or retrieve the
721       autoflush setting.
722
723   input_line_number
724           $z->input_line_number()
725           $z->input_line_number(EXPR)
726
727       This method always returns "undef" when compressing.
728
729   fileno
730           $z->fileno()
731           fileno($z)
732
733       If the $z object is associated with a file or a filehandle, "fileno"
734       will return the underlying file descriptor. Once the "close" method is
735       called "fileno" will return "undef".
736
737       If the $z object is associated with a buffer, this method will return
738       "undef".
739
740   close
741           $z->close() ;
742           close $z ;
743
744       Flushes any pending compressed data and then closes the output
745       file/buffer.
746
747       For most versions of Perl this method will be automatically invoked if
748       the IO::Compress::Gzip object is destroyed (either explicitly or by the
749       variable with the reference to the object going out of scope). The
750       exceptions are Perl versions 5.005 through 5.00504 and 5.8.0. In these
751       cases, the "close" method will be called automatically, but not until
752       global destruction of all live objects when the program is terminating.
753
754       Therefore, if you want your scripts to be able to run on all versions
755       of Perl, you should call "close" explicitly and not rely on automatic
756       closing.
757
758       Returns true on success, otherwise 0.
759
760       If the "AutoClose" option has been enabled when the IO::Compress::Gzip
761       object was created, and the object is associated with a file, the
762       underlying file will also be closed.
763
764   newStream([OPTS])
765       Usage is
766
767           $z->newStream( [OPTS] )
768
769       Closes the current compressed data stream and starts a new one.
770
771       OPTS consists of any of the options that are available when creating
772       the $z object.
773
774       See the "Constructor Options" section for more details.
775
776   deflateParams
777       Usage is
778
779           $z->deflateParams
780
781       TODO
782

Importing

784       A number of symbolic constants are required by some methods in
785       "IO::Compress::Gzip". None are imported by default.
786
787       :all Imports "gzip", $GzipError and all symbolic constants that can be
788            used by "IO::Compress::Gzip". Same as doing this
789
790                use IO::Compress::Gzip qw(gzip $GzipError :constants) ;
791
792       :constants
793            Import all symbolic constants. Same as doing this
794
795                use IO::Compress::Gzip qw(:flush :level :strategy) ;
796
797       :flush
798            These symbolic constants are used by the "flush" method.
799
800                Z_NO_FLUSH
801                Z_PARTIAL_FLUSH
802                Z_SYNC_FLUSH
803                Z_FULL_FLUSH
804                Z_FINISH
805                Z_BLOCK
806
807       :level
808            These symbolic constants are used by the "Level" option in the
809            constructor.
810
811                Z_NO_COMPRESSION
812                Z_BEST_SPEED
813                Z_BEST_COMPRESSION
814                Z_DEFAULT_COMPRESSION
815
816       :strategy
817            These symbolic constants are used by the "Strategy" option in the
818            constructor.
819
820                Z_FILTERED
821                Z_HUFFMAN_ONLY
822                Z_RLE
823                Z_FIXED
824                Z_DEFAULT_STRATEGY
825

EXAMPLES

827   Apache::GZip Revisited
828       See IO::Compress::FAQ
829
830   Working with Net::FTP
831       See IO::Compress::FAQ
832

SUPPORT

834       General feedback/questions/bug reports should be sent to
835       <https://github.com/pmqs/IO-Copress/issues> (preferred) or
836       <https://rt.cpan.org/Public/Dist/Display.html?Name=IO-Copress>.
837

SEE ALSO

839       Compress::Zlib, IO::Uncompress::Gunzip, IO::Compress::Deflate,
840       IO::Uncompress::Inflate, IO::Compress::RawDeflate,
841       IO::Uncompress::RawInflate, IO::Compress::Bzip2,
842       IO::Uncompress::Bunzip2, IO::Compress::Lzma, IO::Uncompress::UnLzma,
843       IO::Compress::Xz, IO::Uncompress::UnXz, IO::Compress::Lzip,
844       IO::Uncompress::UnLzip, IO::Compress::Lzop, IO::Uncompress::UnLzop,
845       IO::Compress::Lzf, IO::Uncompress::UnLzf, IO::Compress::Zstd,
846       IO::Uncompress::UnZstd, IO::Uncompress::AnyInflate,
847       IO::Uncompress::AnyUncompress
848
849       IO::Compress::FAQ
850
851       File::GlobMapper, Archive::Zip, Archive::Tar, IO::Zlib
852
853       For RFC 1950, 1951 and 1952 see
854       <http://www.faqs.org/rfcs/rfc1950.html>,
855       <http://www.faqs.org/rfcs/rfc1951.html> and
856       <http://www.faqs.org/rfcs/rfc1952.html>
857
858       The zlib compression library was written by Jean-loup Gailly
859       "gzip@prep.ai.mit.edu" and Mark Adler "madler@alumni.caltech.edu".
860
861       The primary site for the zlib compression library is
862       <http://www.zlib.org>.
863
864       The primary site for gzip is <http://www.gzip.org>.
865

AUTHOR

867       This module was written by Paul Marquess, "pmqs@cpan.org".
868

MODIFICATION HISTORY

870       See the Changes file.
871
873       Copyright (c) 2005-2021 Paul Marquess. All rights reserved.
874
875       This program is free software; you can redistribute it and/or modify it
876       under the same terms as Perl itself.
877
878
879
880perl v5.34.0                      2022-01-21             IO::Compress::Gzip(3)
Impressum