diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/IO/Uncompress/Unzip.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/IO/Uncompress/Unzip.pm | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/Master/tlpkg/tlperl/lib/IO/Uncompress/Unzip.pm b/Master/tlpkg/tlperl/lib/IO/Uncompress/Unzip.pm index 4175136fc3c..3b36f839a05 100644 --- a/Master/tlpkg/tlperl/lib/IO/Uncompress/Unzip.pm +++ b/Master/tlpkg/tlperl/lib/IO/Uncompress/Unzip.pm @@ -9,14 +9,14 @@ use warnings; #use bytes; use IO::File; -use IO::Uncompress::RawInflate 2.060 ; -use IO::Compress::Base::Common 2.060 qw(:Status ); -use IO::Uncompress::Adapter::Inflate 2.060 ; -use IO::Uncompress::Adapter::Identity 2.060 ; -use IO::Compress::Zlib::Extra 2.060 ; -use IO::Compress::Zip::Constants 2.060 ; +use IO::Uncompress::RawInflate 2.064 ; +use IO::Compress::Base::Common 2.064 qw(:Status ); +use IO::Uncompress::Adapter::Inflate 2.064 ; +use IO::Uncompress::Adapter::Identity 2.064 ; +use IO::Compress::Zlib::Extra 2.064 ; +use IO::Compress::Zip::Constants 2.064 ; -use Compress::Raw::Zlib 2.060 () ; +use Compress::Raw::Zlib 2.064 () ; BEGIN { @@ -31,7 +31,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $UnzipError, %headerLookup); -$VERSION = '2.060'; +$VERSION = '2.064'; $UnzipError = ''; @ISA = qw(Exporter IO::Uncompress::RawInflate); @@ -1101,7 +1101,7 @@ section. The functional interface needs Perl5.005 or better. -=head2 unzip $input => $output [, OPTS] +=head2 unzip $input_filename_or_reference => $output_filename_or_reference [, OPTS] C<unzip> expects at least two parameters, C<$input_filename_or_reference> and C<$output_filename_or_reference>. @@ -1343,7 +1343,7 @@ specific member from the file, say C<"data1">, use the C<Name> option or die "unzip failed: $UnzipError\n"; Alternatively, if you want to read the C<"data1"> member into memory, use -a scalar reference for the C<output> partameter. +a scalar reference for the C<output> parameter. use strict ; use warnings ; @@ -1526,7 +1526,7 @@ Usage is $status = $z->read($buffer) -Reads a block of compressed data (the size the the compressed block is +Reads a block of compressed data (the size of the compressed block is determined by the C<Buffer> option in the constructor), uncompresses it and writes any uncompressed data into C<$buffer>. If the C<Append> parameter is set in the constructor, the uncompressed data will be appended to the @@ -1564,7 +1564,7 @@ Usage is Reads a single line. -This method fully supports the use of of the variable C<$/> (or +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. @@ -1632,7 +1632,7 @@ It is a fatal error to attempt to seek backward. Note that the implementation of C<seek> in this module does not provide true random access to a compressed file/buffer. It works by uncompressing data from the current offset in the file/buffer until it reaches the -ucompressed offset specified in the parameters to C<seek>. For very small +uncompressed offset specified in the parameters to C<seek>. For very small files this may be acceptable behaviour. For large files it may cause an unacceptable delay. @@ -1681,7 +1681,7 @@ Returns the current uncompressed line number. If C<EXPR> is present it has the effect of setting the line number. Note that setting the line number does not change the current position within the file/buffer being read. -The contents of C<$/> are used to to determine what constitutes a line +The contents of C<$/> are used to determine what constitutes a line terminator. =head2 fileno @@ -1821,6 +1821,13 @@ It is also worth noting that C<nextStream> can be called at any time -- you don't have to wait until you have exhausted a compressed data stream before skipping to the next one. +=head2 Unzipping a complete zip file to disk + +Daniel S. Sterling has written a script that uses C<IO::Uncompress::UnZip> +to read a zip file and unzip its contents to disk. + +The script is available from L<https://gist.github.com/eqhmcow/5389877> + =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::Uncompress::Bunzip2>, 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> @@ -1854,7 +1861,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2013 Paul Marquess. All rights reserved. +Copyright (c) 2005-2014 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. |