⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 io::uncompress::anyinflate.3

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 3
📖 第 1 页 / 共 3 页
字号:
\&\s-1TODO\s0.SH "Methods".IX Header "Methods".Sh "read".IX Subsection "read"Usage is.PP.Vb 1\&    $status = $z\->read($buffer).Ve.PPReads a block of compressed data (the size the the compressed block isdetermined by the \f(CW\*(C`Buffer\*(C'\fR option in the constructor), uncompresses it andwrites any uncompressed data into \f(CW$buffer\fR. If the \f(CW\*(C`Append\*(C'\fR parameter isset in the constructor, the uncompressed data will be appended to the\&\f(CW$buffer\fR parameter. Otherwise \f(CW$buffer\fR will be overwritten..PPReturns the number of uncompressed bytes written to \f(CW$buffer\fR, zero if eofor a negative number on error..Sh "read".IX Subsection "read"Usage is.PP.Vb 2\&    $status = $z\->read($buffer, $length)\&    $status = $z\->read($buffer, $length, $offset)\&\&    $status = read($z, $buffer, $length)\&    $status = read($z, $buffer, $length, $offset).Ve.PPAttempt to read \f(CW$length\fR bytes of uncompressed data into \f(CW$buffer\fR..PPThe main difference between this form of the \f(CW\*(C`read\*(C'\fR method and theprevious one, is that this one will attempt to return \fIexactly\fR \f(CW$length\fRbytes. The only circumstances that this function will not is if end-of-fileor an \s-1IO\s0 error is encountered..PPReturns the number of uncompressed bytes written to \f(CW$buffer\fR, zero if eofor a negative number on error..Sh "getline".IX Subsection "getline"Usage is.PP.Vb 2\&    $line = $z\->getline()\&    $line = <$z>.Ve.PPReads a single line..PPThis method fully supports the use of of the variable \f(CW$/\fR (or\&\f(CW$INPUT_RECORD_SEPARATOR\fR or \f(CW$RS\fR when \f(CW\*(C`English\*(C'\fR is in use) todetermine what constitutes an end of line. Paragraph mode, record mode andfile slurp mode are all supported..Sh "getc".IX Subsection "getc"Usage is.PP.Vb 1\&    $char = $z\->getc().Ve.PPRead a single character..Sh "ungetc".IX Subsection "ungetc"Usage is.PP.Vb 1\&    $char = $z\->ungetc($string).Ve.Sh "inflateSync".IX Subsection "inflateSync"Usage is.PP.Vb 1\&    $status = $z\->inflateSync().Ve.PP\&\s-1TODO\s0.Sh "getHeaderInfo".IX Subsection "getHeaderInfo"Usage is.PP.Vb 2\&    $hdr  = $z\->getHeaderInfo();\&    @hdrs = $z\->getHeaderInfo();.Ve.PPThis method returns either a hash reference (in scalar context) or a listor hash references (in array context) that contains information about eachof the header fields in the compressed data stream(s)..Sh "tell".IX Subsection "tell"Usage is.PP.Vb 2\&    $z\->tell()\&    tell $z.Ve.PPReturns the uncompressed file offset..Sh "eof".IX Subsection "eof"Usage is.PP.Vb 2\&    $z\->eof();\&    eof($z);.Ve.PPReturns true if the end of the compressed input stream has been reached..Sh "seek".IX Subsection "seek".Vb 2\&    $z\->seek($position, $whence);\&    seek($z, $position, $whence);.Ve.PPProvides a sub-set of the \f(CW\*(C`seek\*(C'\fR functionality, with the restrictionthat it is only legal to seek forward in the input file/buffer.It is a fatal error to attempt to seek backward..PPThe \f(CW$whence\fR parameter takes one the usual values, namely \s-1SEEK_SET\s0,\&\s-1SEEK_CUR\s0 or \s-1SEEK_END\s0..PPReturns 1 on success, 0 on failure..Sh "binmode".IX Subsection "binmode"Usage is.PP.Vb 2\&    $z\->binmode\&    binmode $z ;.Ve.PPThis is a noop provided for completeness..Sh "opened".IX Subsection "opened".Vb 1\&    $z\->opened().Ve.PPReturns true if the object currently refers to a opened file/buffer..Sh "autoflush".IX Subsection "autoflush".Vb 2\&    my $prev = $z\->autoflush()\&    my $prev = $z\->autoflush(EXPR).Ve.PPIf the \f(CW$z\fR object is associated with a file or a filehandle, this methodreturns the current autoflush setting for the underlying filehandle. If\&\f(CW\*(C`EXPR\*(C'\fR is present, and is non-zero, it will enable flushing after everywrite/print operation..PPIf \f(CW$z\fR is associated with a buffer, this method has no effect and alwaysreturns \f(CW\*(C`undef\*(C'\fR..PP\&\fBNote\fR that the special variable \f(CW$|\fR \fBcannot\fR be used to set orretrieve the autoflush setting..Sh "input_line_number".IX Subsection "input_line_number".Vb 2\&    $z\->input_line_number()\&    $z\->input_line_number(EXPR).Ve.PPReturns the current uncompressed line number. If \f(CW\*(C`EXPR\*(C'\fR is present it hasthe effect of setting the line number. Note that setting the line numberdoes not change the current position within the file/buffer being read..PPThe contents of \f(CW$/\fR are used to to determine what constitutes a lineterminator..Sh "fileno".IX Subsection "fileno".Vb 2\&    $z\->fileno()\&    fileno($z).Ve.PPIf the \f(CW$z\fR object is associated with a file or a filehandle, this methodwill return the underlying file descriptor..PPIf the \f(CW$z\fR object is is associated with a buffer, this method willreturn undef..Sh "close".IX Subsection "close".Vb 2\&    $z\->close() ;\&    close $z ;.Ve.PPCloses the output file/buffer..PPFor most versions of Perl this method will be automatically invoked ifthe IO::Uncompress::AnyInflate object is destroyed (either explicitly or by thevariable with the reference to the object going out of scope). Theexceptions are Perl versions 5.005 through 5.00504 and 5.8.0. Inthese cases, the \f(CW\*(C`close\*(C'\fR method will be called automatically, butnot until global destruction of all live objects when the program isterminating..PPTherefore, if you want your scripts to be able to run on all versionsof Perl, you should call \f(CW\*(C`close\*(C'\fR explicitly and not rely on automaticclosing..PPReturns true on success, otherwise 0..PPIf the \f(CW\*(C`AutoClose\*(C'\fR option has been enabled when the IO::Uncompress::AnyInflateobject was created, and the object is associated with a file, theunderlying file will also be closed..Sh "nextStream".IX Subsection "nextStream"Usage is.PP.Vb 1\&    my $status = $z\->nextStream();.Ve.PPSkips to the next compressed data stream in the input file/buffer. If a newcompressed data stream is found, the eof marker will be cleared and \f(CW$.\fRwill be reset to 0..PPReturns 1 if a new stream was found, 0 if none was found, and \-1 if anerror was encountered..Sh "trailingData".IX Subsection "trailingData"Usage is.PP.Vb 1\&    my $data = $z\->trailingData();.Ve.PPReturns the data, if any, that is present immediately after the compresseddata stream once uncompression is complete. It only makes sense to callthis method once the end of the compressed data stream has beenencountered..PPThis option can be used when there is useful information immediatelyfollowing the compressed data stream, and you don't know the length of thecompressed data stream..PPIf the input is a buffer, \f(CW\*(C`trailingData\*(C'\fR will return everything from theend of the compressed data stream to the end of the buffer..PPIf the input is a filehandle, \f(CW\*(C`trailingData\*(C'\fR will return the data that isleft in the filehandle input buffer once the end of the compressed datastream has been reached. You can then use the filehandle to read the restof the input file..PPDon't bother using \f(CW\*(C`trailingData\*(C'\fR if the input is a filename..PPIf you know the length of the compressed data stream before you startuncompressing, you can avoid having to use \f(CW\*(C`trailingData\*(C'\fR by setting the\&\f(CW\*(C`InputLength\*(C'\fR option in the constructor..SH "Importing".IX Header "Importing"No symbolic constants are required by this IO::Uncompress::AnyInflate at present..IP ":all" 5.IX Item ":all"Imports \f(CW\*(C`anyinflate\*(C'\fR and \f(CW$AnyInflateError\fR.Same as doing this.Sp.Vb 1\&    use IO::Uncompress::AnyInflate qw(anyinflate $AnyInflateError) ;.Ve.SH "EXAMPLES".IX Header "EXAMPLES".SH "SEE ALSO".IX Header "SEE ALSO"Compress::Zlib, IO::Compress::Gzip, IO::Uncompress::Gunzip, IO::Compress::Deflate, IO::Uncompress::Inflate, IO::Compress::RawDeflate, IO::Uncompress::RawInflate, IO::Compress::Bzip2, IO::Uncompress::Bunzip2, IO::Compress::Lzop, IO::Uncompress::UnLzop, IO::Compress::Lzf, IO::Uncompress::UnLzf, IO::Uncompress::AnyUncompress.PPCompress::Zlib::FAQ.PPFile::GlobMapper, Archive::Zip,Archive::Tar,IO::Zlib.PPFor \s-1RFC\s0 1950, 1951 and 1952 see \&\fIhttp://www.faqs.org/rfcs/rfc1950.html\fR,\&\fIhttp://www.faqs.org/rfcs/rfc1951.html\fR and\&\fIhttp://www.faqs.org/rfcs/rfc1952.html\fR.PPThe \fIzlib\fR compression library was written by Jean-loup Gailly\&\fIgzip@prep.ai.mit.edu\fR and Mark Adler \fImadler@alumni.caltech.edu\fR..PPThe primary site for the \fIzlib\fR compression library is\&\fIhttp://www.zlib.org\fR..PPThe primary site for gzip is \fIhttp://www.gzip.org\fR..SH "AUTHOR".IX Header "AUTHOR"This module was written by Paul Marquess, \fIpmqs@cpan.org\fR..SH "MODIFICATION HISTORY".IX Header "MODIFICATION HISTORY"See the Changes file..SH "COPYRIGHT AND LICENSE".IX Header "COPYRIGHT AND LICENSE"Copyright (c) 2005\-2007 Paul Marquess. All rights reserved..PPThis program is free software; you can redistribute it and/ormodify it under the same terms as Perl itself.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -