summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Bunzip2.pm
diff options
context:
space:
mode:
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Bunzip2.pm')
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Bunzip2.pm77
1 files changed, 37 insertions, 40 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Bunzip2.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Bunzip2.pm
index 26556b7625..7a84bcd15c 100644
--- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Bunzip2.pm
+++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Bunzip2.pm
@@ -4,15 +4,15 @@ use strict ;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.074 qw(:Status );
+use IO::Compress::Base::Common 2.084 qw(:Status );
-use IO::Uncompress::Base 2.074 ;
-use IO::Uncompress::Adapter::Bunzip2 2.074 ;
+use IO::Uncompress::Base 2.084 ;
+use IO::Uncompress::Adapter::Bunzip2 2.084 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bunzip2Error);
-$VERSION = '2.074';
+$VERSION = '2.084';
$Bunzip2Error = '';
@ISA = qw(IO::Uncompress::Base Exporter);
@@ -149,7 +149,7 @@ IO::Uncompress::Bunzip2 - Read bzip2 files/buffers
my $status = bunzip2 $input => $output [,OPTS]
or die "bunzip2 failed: $Bunzip2Error\n";
- my $z = new IO::Uncompress::Bunzip2 $input [OPTS]
+ my $z = new IO::Uncompress::Bunzip2 $input [OPTS]
or die "bunzip2 failed: $Bunzip2Error\n";
$status = $z->read($buffer)
@@ -201,7 +201,7 @@ section.
use IO::Uncompress::Bunzip2 qw(bunzip2 $Bunzip2Error) ;
- bunzip2 $input_filename_or_reference => $output_filename_or_reference [,OPTS]
+ bunzip2 $input_filename_or_reference => $output_filename_or_reference [,OPTS]
or die "bunzip2 failed: $Bunzip2Error\n";
The functional interface needs Perl5.005 or better.
@@ -214,7 +214,7 @@ C<$input_filename_or_reference> and C<$output_filename_or_reference>.
=head3 The C<$input_filename_or_reference> parameter
The parameter, C<$input_filename_or_reference>, is used to define the
-source of the compressed data.
+source of the compressed data.
It can take one of the following forms:
@@ -232,17 +232,17 @@ If the C<$input_filename_or_reference> parameter is a filehandle, the input
data will be read from it. The string '-' can be used as an alias for
standard input.
-=item A scalar reference
+=item A scalar reference
If C<$input_filename_or_reference> is a scalar reference, the input data
will be read from C<$$input_filename_or_reference>.
-=item An array reference
+=item An array reference
If C<$input_filename_or_reference> is an array reference, each element in
the array must be a filename.
-The input data will be read from each file in turn.
+The input data will be read from each file in turn.
The complete array will be walked to ensure that it only
contains valid filenames before any data is uncompressed.
@@ -250,8 +250,8 @@ contains valid filenames before any data is uncompressed.
=item An Input FileGlob string
If C<$input_filename_or_reference> is a string that is delimited by the
-characters "<" and ">" C<bunzip2> will assume that it is an
-I<input fileglob string>. The input is the list of files that match the
+characters "<" and ">" C<bunzip2> will assume that it is an
+I<input fileglob string>. The input is the list of files that match the
fileglob.
See L<File::GlobMapper|File::GlobMapper> for more details.
@@ -272,7 +272,7 @@ these forms.
=item A filename
If the C<$output_filename_or_reference> parameter is a simple scalar, it is
-assumed to be a filename. This file will be opened for writing and the
+assumed to be a filename. This file will be opened for writing and the
uncompressed data will be written to it.
=item A filehandle
@@ -281,14 +281,14 @@ If the C<$output_filename_or_reference> parameter is a filehandle, the
uncompressed data will be written to it. The string '-' can be used as
an alias for standard output.
-=item A scalar reference
+=item A scalar reference
If C<$output_filename_or_reference> is a scalar reference, the
uncompressed data will be stored in C<$$output_filename_or_reference>.
=item An Array Reference
-If C<$output_filename_or_reference> is an array reference,
+If C<$output_filename_or_reference> is an array reference,
the uncompressed data will be pushed onto the array.
=item An Output FileGlob
@@ -327,7 +327,7 @@ L</"Constructor Options"> section below.
=item C<< AutoClose => 0|1 >>
-This option applies to any input or output data streams to
+This option applies to any input or output data streams to
C<bunzip2> that are filehandles.
If C<AutoClose> is specified, and the value is true, it will result in all
@@ -338,10 +338,7 @@ This parameter defaults to 0.
=item C<< BinModeOut => 0|1 >>
-When writing to a file or filehandle, set C<binmode> before writing to the
-file.
-
-Defaults to 0.
+This option is now a no-op. All files will be written in binmode.
=item C<< Append => 0|1 >>
@@ -370,7 +367,7 @@ written to it. Otherwise the file pointer will not be moved.
=back
-When C<Append> is specified, and set to true, it will I<append> all uncompressed
+When C<Append> is specified, and set to true, it will I<append> all uncompressed
data to the output data stream.
So when the output is a filehandle it will carry out a seek to the eof
@@ -398,7 +395,7 @@ Defaults to 0.
=item C<< TrailingData => $scalar >>
Returns the data, if any, that is present immediately after the compressed
-data stream once uncompression is complete.
+data stream once uncompression is complete.
This option can be used when there is useful information immediately
following the compressed data stream, and you don't know the length of the
@@ -410,7 +407,7 @@ end of the compressed data stream to the end of the buffer.
If the input is a filehandle, C<trailingData> will return the data that is
left in the filehandle input buffer once the end of the compressed data
stream has been reached. You can then use the filehandle to read the rest
-of the input file.
+of the input file.
Don't bother using C<trailingData> if the input is a filename.
@@ -445,7 +442,7 @@ uncompressed data to a buffer, C<$buffer>.
my $input = new IO::File "<file1.txt.bz2"
or die "Cannot open 'file1.txt.bz2': $!\n" ;
my $buffer ;
- bunzip2 $input => \$buffer
+ bunzip2 $input => \$buffer
or die "bunzip2 failed: $Bunzip2Error\n";
To uncompress all files in the directory "/my/home" that match "*.txt.bz2" and store the compressed data in the same directory
@@ -467,7 +464,7 @@ and if you want to compress each file one at a time, this will do the trick
{
my $output = $input;
$output =~ s/.bz2// ;
- bunzip2 $input => $output
+ bunzip2 $input => $output
or die "Error compressing '$input': $Bunzip2Error\n";
}
@@ -508,7 +505,7 @@ If the C<$input> parameter is a filehandle, the compressed data will be
read from it.
The string '-' can be used as an alias for standard input.
-=item A scalar reference
+=item A scalar reference
If C<$input> is a scalar reference, the compressed data will be read from
C<$$input>.
@@ -583,7 +580,7 @@ When present this option will limit the number of compressed bytes read
from the input file/buffer to C<$size>. This option can be used in the
situation where there is useful data directly after the compressed data
stream and you know beforehand the exact length of the compressed data
-stream.
+stream.
This option is mostly used when reading from a filehandle, in which case
the file pointer will be left pointing to the first byte directly after the
@@ -611,7 +608,7 @@ This option is a no-op.
When non-zero this options will make bzip2 use a decompression algorithm
that uses less memory at the expense of increasing the amount of time
-taken for decompression.
+taken for decompression.
Default is 0.
@@ -621,7 +618,7 @@ Default is 0.
TODO
-=head1 Methods
+=head1 Methods
=head2 read
@@ -665,16 +662,16 @@ Usage is
$line = $z->getline()
$line = <$z>
-Reads a single line.
+Reads a single line.
This method fully supports the use of the variable C<$/> (or
C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to
determine what constitutes an end of line. Paragraph mode, record mode and
-file slurp mode are all supported.
+file slurp mode are all supported.
=head2 getc
-Usage is
+Usage is
$char = $z->getc()
@@ -749,7 +746,7 @@ This is a noop provided for completeness.
$z->opened()
-Returns true if the object currently refers to a opened file/buffer.
+Returns true if the object currently refers to a opened file/buffer.
=head2 autoflush
@@ -796,7 +793,7 @@ C<undef>.
$z->close() ;
close $z ;
-Closes the output file/buffer.
+Closes the output file/buffer.
For most versions of Perl this method will be automatically invoked if
the IO::Uncompress::Bunzip2 object is destroyed (either explicitly or by the
@@ -850,7 +847,7 @@ end of the compressed data stream to the end of the buffer.
If the input is a filehandle, C<trailingData> will return the data that is
left in the filehandle input buffer once the end of the compressed data
stream has been reached. You can then use the filehandle to read the rest
-of the input file.
+of the input file.
Don't bother using C<trailingData> if the input is a filename.
@@ -858,9 +855,9 @@ If you know the length of the compressed data stream before you start
uncompressing, you can avoid having to use C<trailingData> by setting the
C<InputLength> option in the constructor.
-=head1 Importing
+=head1 Importing
-No symbolic constants are required by this IO::Uncompress::Bunzip2 at present.
+No symbolic constants are required by this IO::Uncompress::Bunzip2 at present.
=over 5
@@ -881,7 +878,7 @@ See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP">
=head1 SEE ALSO
-L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress>
+L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, 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>
L<IO::Compress::FAQ|IO::Compress::FAQ>
@@ -895,7 +892,7 @@ See the module L<Compress::Bzip2|Compress::Bzip2>
=head1 AUTHOR
-This module was written by Paul Marquess, C<pmqs@cpan.org>.
+This module was written by Paul Marquess, C<pmqs@cpan.org>.
=head1 MODIFICATION HISTORY
@@ -903,7 +900,7 @@ See the Changes file.
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2005-2017 Paul Marquess. All rights reserved.
+Copyright (c) 2005-2019 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.