X7ROOT File Manager
Current Path:
/usr/share/doc/perl-Archive-Zip/examples
usr
/
share
/
doc
/
perl-Archive-Zip
/
examples
/
📁
..
📄
calcSizes.pl
(948 B)
📄
copy.pl
(452 B)
📄
extract.pl
(896 B)
📄
mailZip.pl
(1.58 KB)
📄
mfh.pl
(640 B)
📄
readScalar.pl
(750 B)
📄
selfex.pl
(1.53 KB)
📄
unzipAll.pl
(561 B)
📄
updateTree.pl
(822 B)
📄
updateZip.pl
(892 B)
📄
writeScalar.pl
(614 B)
📄
writeScalar2.pl
(613 B)
📄
zip.pl
(666 B)
📄
zipGrep.pl
(1.42 KB)
📄
zipcheck.pl
(1010 B)
📄
zipinfo.pl
(4.36 KB)
📄
ziprecent.pl
(7.53 KB)
📄
ziptest.pl
(1.76 KB)
Editing: readScalar.pl
#!/usr/bin/perl -w # Demonstrates reading a zip from an IO::Scalar # $Revision: 1.4 $ use strict; use Archive::Zip qw(:CONSTANTS :ERROR_CODES); use IO::Scalar; use IO::File; # test reading from a scalar my $file = IO::File->new('testin.zip', 'r'); my $zipContents; binmode($file); $file->read($zipContents, 20000); $file->close(); printf "Read %d bytes\n", length($zipContents); my $SH = IO::Scalar->new(\$zipContents); my $zip = Archive::Zip->new(); $zip->readFromFileHandle($SH); my $member = $zip->addString('c' x 300, 'bunchOfCs.txt'); $member->desiredCompressionMethod(COMPRESSION_DEFLATED); $member = $zip->addString('d' x 300, 'bunchOfDs.txt'); $member->desiredCompressionMethod(COMPRESSION_DEFLATED); $zip->writeToFileNamed('test2.zip');
Upload File
Create Folder