{
    "content": [
        {
            "type": "text",
            "text": "# IO::Uncompress::AnyUncompress (perldoc)\n\n**Summary:** IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2, zstd, xz, lzma, lzip, lzf or lzop file/buffer\n\n**Synopsis:** use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\nmy $status = anyuncompress $input => $output [,OPTS]\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\nmy $z = IO::Uncompress::AnyUncompress->new( $input [OPTS] )\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n$status = $z->read($buffer)\n$status = $z->read($buffer, $length)\n$status = $z->read($buffer, $length, $offset)\n$line = $z->getline()\n$char = $z->getc()\n$char = $z->ungetc()\n$char = $z->opened()\n$data = $z->trailingData()\n$status = $z->nextStream()\n$data = $z->getHeaderInfo()\n$z->tell()\n$z->seek($position, $whence)\n$z->binmode()\n$z->fileno()\n$z->eof()\n$z->close()\n$AnyUncompressError ;\n# IO::File mode\n<$z>\nread($z, $buffer);\nread($z, $buffer, $length);\nread($z, $buffer, $length, $offset);\ntell($z)\nseek($z, $position, $whence)\nbinmode($z)\nfileno($z)\neof($z)\nclose($z)\n\n## Section Outline\n\n- **NAME** (3 lines)\n- **SYNOPSIS** (41 lines)\n- **DESCRIPTION** (19 lines)\n- **Functional Interface** (84 lines) — 8 subsections\n  - Notes (5 lines)\n  - Optional Parameters (77 lines)\n  - Examples (51 lines)\n  - Constructor (30 lines)\n  - Constructor Options (3 lines)\n  - -AutoClose (1 lines)\n  - -autoclose (94 lines)\n  - Examples (2 lines)\n- **Methods** (63 lines) — 1 subsections\n  - stream (131 lines)\n- **Importing** (6 lines)\n- **EXAMPLES** (1 lines)\n- **SUPPORT** (4 lines)\n- **SEE ALSO** (11 lines)\n- **AUTHOR** (2 lines)\n- **MODIFICATION HISTORY** (2 lines)\n- **COPYRIGHT AND LICENSE** (5 lines)\n\n## Full Content\n\n### NAME\n\nIO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2, zstd, xz, lzma, lzip, lzf or lzop\nfile/buffer\n\n### SYNOPSIS\n\nuse IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\n\nmy $status = anyuncompress $input => $output [,OPTS]\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n\nmy $z = IO::Uncompress::AnyUncompress->new( $input [OPTS] )\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n\n$status = $z->read($buffer)\n$status = $z->read($buffer, $length)\n$status = $z->read($buffer, $length, $offset)\n$line = $z->getline()\n$char = $z->getc()\n$char = $z->ungetc()\n$char = $z->opened()\n\n$data = $z->trailingData()\n$status = $z->nextStream()\n$data = $z->getHeaderInfo()\n$z->tell()\n$z->seek($position, $whence)\n$z->binmode()\n$z->fileno()\n$z->eof()\n$z->close()\n\n$AnyUncompressError ;\n\n# IO::File mode\n\n<$z>\nread($z, $buffer);\nread($z, $buffer, $length);\nread($z, $buffer, $length, $offset);\ntell($z)\nseek($z, $position, $whence)\nbinmode($z)\nfileno($z)\neof($z)\nclose($z)\n\n### DESCRIPTION\n\nThis module provides a Perl interface that allows the reading of files/buffers that have been\ncompressed with a variety of compression libraries.\n\nThe formats supported are:\n\nRFC 1950\nRFC 1951 (optionally)\ngzip (RFC 1952)\nzip\nzstd (Zstandard)\nbzip2\nlzop\nlzf\nlzma\nlzip\nxz\n\nThe module will auto-detect which, if any, of the supported compression formats is being used.\n\n### Functional Interface\n\nA top-level function, \"anyuncompress\", is provided to carry out \"one-shot\" uncompression between\nbuffers and/or files. For finer control over the uncompression process, see the \"OO Interface\"\nsection.\n\nuse IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\n\nanyuncompress $inputfilenameorreference => $outputfilenameorreference [,OPTS]\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n\nThe functional interface needs Perl5.005 or better.\n\nanyuncompress $inputfilenameorreference => $outputfilenameorreference [, OPTS]\n\"anyuncompress\" expects at least two parameters, $inputfilenameorreference and\n$outputfilenameorreference and zero or more optional parameters (see \"Optional Parameters\")\n\nThe $inputfilenameorreference parameter\nThe parameter, $inputfilenameorreference, is used to define the source of the compressed\ndata.\n\nIt can take one of the following forms:\n\nA filename\nIf the $inputfilenameorreference parameter is a simple scalar, it is assumed to be a\nfilename. This file will be opened for reading and the input data will be read from it.\n\nA filehandle\nIf the $inputfilenameorreference parameter is a filehandle, the input data will be read\nfrom it. The string '-' can be used as an alias for standard input.\n\nA scalar reference\nIf $inputfilenameorreference is a scalar reference, the input data will be read from\n$$inputfilenameorreference.\n\nAn array reference\nIf $inputfilenameorreference is an array reference, each element in the array must be a\nfilename.\n\nThe input data will be read from each file in turn.\n\nThe complete array will be walked to ensure that it only contains valid filenames before\nany data is uncompressed.\n\nAn Input FileGlob string\nIf $inputfilenameorreference is a string that is delimited by the characters \"<\" and \">\"\n\"anyuncompress\" will assume that it is an *input fileglob string*. The input is the list of\nfiles that match the fileglob.\n\nSee File::GlobMapper for more details.\n\nIf the $inputfilenameorreference parameter is any other type, \"undef\" will be returned.\n\nThe $outputfilenameorreference parameter\nThe parameter $outputfilenameorreference is used to control the destination of the\nuncompressed data. This parameter can take one of these forms.\n\nA filename\nIf the $outputfilenameorreference parameter is a simple scalar, it is assumed to be a\nfilename. This file will be opened for writing and the uncompressed data will be written to\nit.\n\nA filehandle\nIf the $outputfilenameorreference parameter is a filehandle, the uncompressed data will\nbe written to it. The string '-' can be used as an alias for standard output.\n\nA scalar reference\nIf $outputfilenameorreference is a scalar reference, the uncompressed data will be\nstored in $$outputfilenameorreference.\n\nAn Array Reference\nIf $outputfilenameorreference is an array reference, the uncompressed data will be\npushed onto the array.\n\nAn Output FileGlob\nIf $outputfilenameorreference is a string that is delimited by the characters \"<\" and\n\">\" \"anyuncompress\" will assume that it is an *output fileglob string*. The output is the\nlist of files that match the fileglob.\n\nWhen $outputfilenameorreference is an fileglob string, $inputfilenameorreference must\nalso be a fileglob string. Anything else is an error.\n\nSee File::GlobMapper for more details.\n\nIf the $outputfilenameorreference parameter is any other type, \"undef\" will be returned.\n\n#### Notes\n\nWhen $inputfilenameorreference maps to multiple compressed files/buffers and\n$outputfilenameorreference is a single file/buffer, after uncompression\n$outputfilenameorreference will contain a concatenation of all the uncompressed data from\neach of the input files/buffers.\n\n#### Optional Parameters\n\nThe optional parameters for the one-shot function \"anyuncompress\" are (for the most part)\nidentical to those used with the OO interface defined in the \"Constructor Options\" section. The\nexceptions are listed below\n\n\"AutoClose => 0|1\"\nThis option applies to any input or output data streams to \"anyuncompress\" that are\nfilehandles.\n\nIf \"AutoClose\" is specified, and the value is true, it will result in all input and/or\noutput filehandles being closed once \"anyuncompress\" has completed.\n\nThis parameter defaults to 0.\n\n\"BinModeOut => 0|1\"\nThis option is now a no-op. All files will be written in binmode.\n\n\"Append => 0|1\"\nThe behaviour of this option is dependent on the type of output data stream.\n\n*    A Buffer\n\nIf \"Append\" is enabled, all uncompressed data will be append to the end of the output\nbuffer. Otherwise the output buffer will be cleared before any uncompressed data is\nwritten to it.\n\n*    A Filename\n\nIf \"Append\" is enabled, the file will be opened in append mode. Otherwise the contents\nof the file, if any, will be truncated before any uncompressed data is written to it.\n\n*    A Filehandle\n\nIf \"Append\" is enabled, the filehandle will be positioned to the end of the file via a\ncall to \"seek\" before any uncompressed data is written to it. Otherwise the file\npointer will not be moved.\n\nWhen \"Append\" is specified, and set to true, it will *append* all uncompressed data to the\noutput data stream.\n\nSo when the output is a filehandle it will carry out a seek to the eof before writing any\nuncompressed data. If the output is a filename, it will be opened for appending. If the\noutput is a buffer, all uncompressed data will be appended to the existing buffer.\n\nConversely when \"Append\" is not specified, or it is present and is set to false, it will\noperate as follows.\n\nWhen the output is a filename, it will truncate the contents of the file before writing any\nuncompressed data. If the output is a filehandle its position will not be changed. If the\noutput is a buffer, it will be wiped before any uncompressed data is output.\n\nDefaults to 0.\n\n\"MultiStream => 0|1\"\nIf the input file/buffer contains multiple compressed data streams, this option will\nuncompress the whole lot as a single data stream.\n\nDefaults to 0.\n\n\"TrailingData => $scalar\"\nReturns the data, if any, that is present immediately after the compressed data stream once\nuncompression is complete.\n\nThis option can be used when there is useful information immediately following the\ncompressed data stream, and you don't know the length of the compressed data stream.\n\nIf the input is a buffer, \"trailingData\" will return everything from the end of the\ncompressed data stream to the end of the buffer.\n\nIf the input is a filehandle, \"trailingData\" will return the data that is left in the\nfilehandle input buffer once the end of the compressed data stream has been reached. You\ncan then use the filehandle to read the rest of the input file.\n\nDon't bother using \"trailingData\" if the input is a filename.\n\nIf you know the length of the compressed data stream before you start uncompressing, you\ncan avoid having to use \"trailingData\" by setting the \"InputLength\" option.\n\n#### Examples\n\nTo read the contents of the file \"file1.txt.Compressed\" and write the uncompressed data to the\nfile \"file1.txt\".\n\nuse strict ;\nuse warnings ;\nuse IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\n\nmy $input = \"file1.txt.Compressed\";\nmy $output = \"file1.txt\";\nanyuncompress $input => $output\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n\nTo read from an existing Perl filehandle, $input, and write the uncompressed data to a buffer,\n$buffer.\n\nuse strict ;\nuse warnings ;\nuse IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\nuse IO::File ;\n\nmy $input = IO::File->new( \"<file1.txt.Compressed\" )\nor die \"Cannot open 'file1.txt.Compressed': $!\\n\" ;\nmy $buffer ;\nanyuncompress $input => \\$buffer\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n\nTo uncompress all files in the directory \"/my/home\" that match \"*.txt.Compressed\" and store the\ncompressed data in the same directory\n\nuse strict ;\nuse warnings ;\nuse IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\n\nanyuncompress '</my/home/*.txt.Compressed>' => '</my/home/#1.txt>'\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n\nand if you want to compress each file one at a time, this will do the trick\n\nuse strict ;\nuse warnings ;\nuse IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\n\nfor my $input ( glob \"/my/home/*.txt.Compressed\" )\n{\nmy $output = $input;\n$output =~ s/.Compressed// ;\nanyuncompress $input => $output\nor die \"Error compressing '$input': $AnyUncompressError\\n\";\n}\n\nOO Interface\n\n#### Constructor\n\nThe format of the constructor for IO::Uncompress::AnyUncompress is shown below\n\nmy $z = IO::Uncompress::AnyUncompress->new( $input [OPTS] )\nor die \"IO::Uncompress::AnyUncompress failed: $AnyUncompressError\\n\";\n\nReturns an \"IO::Uncompress::AnyUncompress\" object on success and undef on failure. The variable\n$AnyUncompressError will contain an error message on failure.\n\nIf you are running Perl 5.005 or better the object, $z, returned from\nIO::Uncompress::AnyUncompress can be used exactly like an IO::File filehandle. This means that\nall normal input file operations can be carried out with $z. For example, to read a line from a\ncompressed file/buffer you can use either of these forms\n\n$line = $z->getline();\n$line = <$z>;\n\nThe mandatory parameter $input is used to determine the source of the compressed data. This\nparameter can take one of three forms.\n\nA filename\nIf the $input parameter is a scalar, it is assumed to be a filename. This file will be\nopened for reading and the compressed data will be read from it.\n\nA filehandle\nIf the $input parameter is a filehandle, the compressed data will be read from it. The\nstring '-' can be used as an alias for standard input.\n\nA scalar reference\nIf $input is a scalar reference, the compressed data will be read from $$input.\n\n#### Constructor Options\n\nThe option names defined below are case insensitive and can be optionally prefixed by a '-'. So\nall of the following are valid\n\n#### -AutoClose\n\n#### -autoclose\n\nAUTOCLOSE\nautoclose\n\nOPTS is a combination of the following options:\n\n\"AutoClose => 0|1\"\nThis option is only valid when the $input parameter is a filehandle. If specified, and the\nvalue is true, it will result in the file being closed once either the \"close\" method is\ncalled or the IO::Uncompress::AnyUncompress object is destroyed.\n\nThis parameter defaults to 0.\n\n\"MultiStream => 0|1\"\nAllows multiple concatenated compressed streams to be treated as a single compressed\nstream. Decompression will stop once either the end of the file/buffer is reached, an error\nis encountered (premature eof, corrupt compressed data) or the end of a stream is not\nimmediately followed by the start of another stream.\n\nThis parameter defaults to 0.\n\n\"Prime => $string\"\nThis option will uncompress the contents of $string before processing the input\nfile/buffer.\n\nThis option can be useful when the compressed data is embedded in another file/data\nstructure and it is not possible to work out where the compressed data begins without\nhaving to read the first few bytes. If this is the case, the uncompression can be *primed*\nwith these bytes using this option.\n\n\"Transparent => 0|1\"\nIf this option is set and the input file/buffer is not compressed data, the module will\nallow reading of it anyway.\n\nIn addition, if the input file/buffer does contain compressed data and there is\nnon-compressed data immediately following it, setting this option will make this module\ntreat the whole file/buffer as a single data stream.\n\nThis option defaults to 1.\n\n\"BlockSize => $num\"\nWhen reading the compressed input data, IO::Uncompress::AnyUncompress will read it in\nblocks of $num bytes.\n\nThis option defaults to 4096.\n\n\"InputLength => $size\"\nWhen present this option will limit the number of compressed bytes read from the input\nfile/buffer to $size. This option can be used in the situation where there is useful data\ndirectly after the compressed data stream and you know beforehand the exact length of the\ncompressed data stream.\n\nThis option is mostly used when reading from a filehandle, in which case the file pointer\nwill be left pointing to the first byte directly after the compressed data stream.\n\nThis option defaults to off.\n\n\"Append => 0|1\"\nThis option controls what the \"read\" method does with uncompressed data.\n\nIf set to 1, all uncompressed data will be appended to the output parameter of the \"read\"\nmethod.\n\nIf set to 0, the contents of the output parameter of the \"read\" method will be overwritten\nby the uncompressed data.\n\nDefaults to 0.\n\n\"Strict => 0|1\"\nThis option controls whether the extra checks defined below are used when carrying out the\ndecompression. When Strict is on, the extra tests are carried out, when Strict is off they\nare not.\n\nThe default for this option is off.\n\n\"RawInflate => 0|1\"\nWhen auto-detecting the compressed format, try to test for raw-deflate (RFC 1951) content\nusing the \"IO::Uncompress::RawInflate\" module.\n\nThe reason this is not default behaviour is because RFC 1951 content can only be detected\nby attempting to uncompress it. This process is error prone and can result is false\npositives.\n\nDefaults to 0.\n\n\"UnLzma => 0|1\"\nWhen auto-detecting the compressed format, try to test for lzmaalone content using the\n\"IO::Uncompress::UnLzma\" module.\n\nThe reason this is not default behaviour is because lzmaalone content can only be detected\nby attempting to uncompress it. This process is error prone and can result is false\npositives.\n\nDefaults to 0.\n\n#### Examples\n\nTODO\n\n### Methods\n\nread\nUsage is\n\n$status = $z->read($buffer)\n\nReads a block of compressed data (the size of the compressed block is determined by the \"Buffer\"\noption in the constructor), uncompresses it and writes any uncompressed data into $buffer. If\nthe \"Append\" parameter is set in the constructor, the uncompressed data will be appended to the\n$buffer parameter. Otherwise $buffer will be overwritten.\n\nReturns the number of uncompressed bytes written to $buffer, zero if eof or a negative number on\nerror.\n\nread\nUsage is\n\n$status = $z->read($buffer, $length)\n$status = $z->read($buffer, $length, $offset)\n\n$status = read($z, $buffer, $length)\n$status = read($z, $buffer, $length, $offset)\n\nAttempt to read $length bytes of uncompressed data into $buffer.\n\nThe main difference between this form of the \"read\" method and the previous one, is that this\none will attempt to return *exactly* $length bytes. The only circumstances that this function\nwill not is if end-of-file or an IO error is encountered.\n\nReturns the number of uncompressed bytes written to $buffer, zero if eof or a negative number on\nerror.\n\ngetline\nUsage is\n\n$line = $z->getline()\n$line = <$z>\n\nReads a single line.\n\nThis method fully supports the use of the variable $/ (or $INPUTRECORDSEPARATOR or $RS when\n\"English\" is in use) to determine what constitutes an end of line. Paragraph mode, record mode\nand file slurp mode are all supported.\n\ngetc\nUsage is\n\n$char = $z->getc()\n\nRead a single character.\n\nungetc\nUsage is\n\n$char = $z->ungetc($string)\n\ngetHeaderInfo\nUsage is\n\n$hdr  = $z->getHeaderInfo();\n@hdrs = $z->getHeaderInfo();\n\nThis method returns either a hash reference (in scalar context) or a list or hash references (in\narray context) that contains information about each of the header fields in the compressed data\n\n#### stream\n\ntell\nUsage is\n\n$z->tell()\ntell $z\n\nReturns the uncompressed file offset.\n\neof\nUsage is\n\n$z->eof();\neof($z);\n\nReturns true if the end of the compressed input stream has been reached.\n\nseek\n$z->seek($position, $whence);\nseek($z, $position, $whence);\n\nProvides a sub-set of the \"seek\" functionality, with the restriction that it is only legal to\nseek forward in the input file/buffer. It is a fatal error to attempt to seek backward.\n\nNote that the implementation of \"seek\" in this module does not provide true random access to a\ncompressed file/buffer. It works by uncompressing data from the current offset in the\nfile/buffer until it reaches the uncompressed offset specified in the parameters to \"seek\". For\nvery small files this may be acceptable behaviour. For large files it may cause an unacceptable\ndelay.\n\nThe $whence parameter takes one the usual values, namely SEEKSET, SEEKCUR or SEEKEND.\n\nReturns 1 on success, 0 on failure.\n\nbinmode\nUsage is\n\n$z->binmode\nbinmode $z ;\n\nThis is a noop provided for completeness.\n\nopened\n$z->opened()\n\nReturns true if the object currently refers to a opened file/buffer.\n\nautoflush\nmy $prev = $z->autoflush()\nmy $prev = $z->autoflush(EXPR)\n\nIf the $z object is associated with a file or a filehandle, this method returns the current\nautoflush setting for the underlying filehandle. If \"EXPR\" is present, and is non-zero, it will\nenable flushing after every write/print operation.\n\nIf $z is associated with a buffer, this method has no effect and always returns \"undef\".\n\nNote that the special variable $| cannot be used to set or retrieve the autoflush setting.\n\ninputlinenumber\n$z->inputlinenumber()\n$z->inputlinenumber(EXPR)\n\nReturns the current uncompressed line number. If \"EXPR\" is present it has the effect of setting\nthe line number. Note that setting the line number does not change the current position within\nthe file/buffer being read.\n\nThe contents of $/ are used to determine what constitutes a line terminator.\n\nfileno\n$z->fileno()\nfileno($z)\n\nIf the $z object is associated with a file or a filehandle, \"fileno\" will return the underlying\nfile descriptor. Once the \"close\" method is called \"fileno\" will return \"undef\".\n\nIf the $z object is associated with a buffer, this method will return \"undef\".\n\nclose\n$z->close() ;\nclose $z ;\n\nCloses the output file/buffer.\n\nFor most versions of Perl this method will be automatically invoked if the\nIO::Uncompress::AnyUncompress object is destroyed (either explicitly or by the variable with the\nreference to the object going out of scope). The exceptions are Perl versions 5.005 through\n5.00504 and 5.8.0. In these cases, the \"close\" method will be called automatically, but not\nuntil global destruction of all live objects when the program is terminating.\n\nTherefore, if you want your scripts to be able to run on all versions of Perl, you should call\n\"close\" explicitly and not rely on automatic closing.\n\nReturns true on success, otherwise 0.\n\nIf the \"AutoClose\" option has been enabled when the IO::Uncompress::AnyUncompress object was\ncreated, and the object is associated with a file, the underlying file will also be closed.\n\nnextStream\nUsage is\n\nmy $status = $z->nextStream();\n\nSkips to the next compressed data stream in the input file/buffer. If a new compressed data\nstream is found, the eof marker will be cleared and $. will be reset to 0.\n\nReturns 1 if a new stream was found, 0 if none was found, and -1 if an error was encountered.\n\ntrailingData\nUsage is\n\nmy $data = $z->trailingData();\n\nReturns the data, if any, that is present immediately after the compressed data stream once\nuncompression is complete. It only makes sense to call this method once the end of the\ncompressed data stream has been encountered.\n\nThis option can be used when there is useful information immediately following the compressed\ndata stream, and you don't know the length of the compressed data stream.\n\nIf the input is a buffer, \"trailingData\" will return everything from the end of the compressed\ndata stream to the end of the buffer.\n\nIf the input is a filehandle, \"trailingData\" will return the data that is left in the filehandle\ninput buffer once the end of the compressed data stream has been reached. You can then use the\nfilehandle to read the rest of the input file.\n\nDon't bother using \"trailingData\" if the input is a filename.\n\nIf you know the length of the compressed data stream before you start uncompressing, you can\navoid having to use \"trailingData\" by setting the \"InputLength\" option in the constructor.\n\n### Importing\n\nNo symbolic constants are required by IO::Uncompress::AnyUncompress at present.\n\n:all Imports \"anyuncompress\" and $AnyUncompressError. Same as doing this\n\nuse IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\n\n### EXAMPLES\n\n### SUPPORT\n\nGeneral feedback/questions/bug reports should be sent to\n<https://github.com/pmqs/IO-Compress/issues> (preferred) or\n<https://rt.cpan.org/Public/Dist/Display.html?Name=IO-Compress>.\n\n### SEE ALSO\n\nCompress::Zlib, IO::Compress::Gzip, IO::Uncompress::Gunzip, IO::Compress::Deflate,\nIO::Uncompress::Inflate, IO::Compress::RawDeflate, IO::Uncompress::RawInflate,\nIO::Compress::Bzip2, IO::Uncompress::Bunzip2, IO::Compress::Lzma, IO::Uncompress::UnLzma,\nIO::Compress::Xz, IO::Uncompress::UnXz, IO::Compress::Lzip, IO::Uncompress::UnLzip,\nIO::Compress::Lzop, IO::Uncompress::UnLzop, IO::Compress::Lzf, IO::Uncompress::UnLzf,\nIO::Compress::Zstd, IO::Uncompress::UnZstd, IO::Uncompress::AnyInflate\n\nIO::Compress::FAQ\n\nFile::GlobMapper, Archive::Zip, Archive::Tar, IO::Zlib\n\n### AUTHOR\n\nThis module was written by Paul Marquess, \"pmqs@cpan.org\".\n\n### MODIFICATION HISTORY\n\nSee the Changes file.\n\n### COPYRIGHT AND LICENSE\n\nCopyright (c) 2005-2021 Paul Marquess. All rights reserved.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\n"
        }
    ],
    "structuredContent": {
        "command": "IO::Uncompress::AnyUncompress",
        "section": "",
        "mode": "perldoc",
        "summary": "IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2, zstd, xz, lzma, lzip, lzf or lzop file/buffer",
        "synopsis": "use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\nmy $status = anyuncompress $input => $output [,OPTS]\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\nmy $z = IO::Uncompress::AnyUncompress->new( $input [OPTS] )\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n$status = $z->read($buffer)\n$status = $z->read($buffer, $length)\n$status = $z->read($buffer, $length, $offset)\n$line = $z->getline()\n$char = $z->getc()\n$char = $z->ungetc()\n$char = $z->opened()\n$data = $z->trailingData()\n$status = $z->nextStream()\n$data = $z->getHeaderInfo()\n$z->tell()\n$z->seek($position, $whence)\n$z->binmode()\n$z->fileno()\n$z->eof()\n$z->close()\n$AnyUncompressError ;\n# IO::File mode\n<$z>\nread($z, $buffer);\nread($z, $buffer, $length);\nread($z, $buffer, $length, $offset);\ntell($z)\nseek($z, $position, $whence)\nbinmode($z)\nfileno($z)\neof($z)\nclose($z)",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 41,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 19,
                "subsections": []
            },
            {
                "name": "Functional Interface",
                "lines": 84,
                "subsections": [
                    {
                        "name": "Notes",
                        "lines": 5
                    },
                    {
                        "name": "Optional Parameters",
                        "lines": 77
                    },
                    {
                        "name": "Examples",
                        "lines": 51
                    },
                    {
                        "name": "Constructor",
                        "lines": 30
                    },
                    {
                        "name": "Constructor Options",
                        "lines": 3
                    },
                    {
                        "name": "-AutoClose",
                        "lines": 1
                    },
                    {
                        "name": "-autoclose",
                        "lines": 94
                    },
                    {
                        "name": "Examples",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "Methods",
                "lines": 63,
                "subsections": [
                    {
                        "name": "stream",
                        "lines": 131
                    }
                ]
            },
            {
                "name": "Importing",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "SUPPORT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "MODIFICATION HISTORY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2, zstd, xz, lzma, lzip, lzf or lzop\nfile/buffer\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\n\nmy $status = anyuncompress $input => $output [,OPTS]\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n\nmy $z = IO::Uncompress::AnyUncompress->new( $input [OPTS] )\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n\n$status = $z->read($buffer)\n$status = $z->read($buffer, $length)\n$status = $z->read($buffer, $length, $offset)\n$line = $z->getline()\n$char = $z->getc()\n$char = $z->ungetc()\n$char = $z->opened()\n\n$data = $z->trailingData()\n$status = $z->nextStream()\n$data = $z->getHeaderInfo()\n$z->tell()\n$z->seek($position, $whence)\n$z->binmode()\n$z->fileno()\n$z->eof()\n$z->close()\n\n$AnyUncompressError ;\n\n# IO::File mode\n\n<$z>\nread($z, $buffer);\nread($z, $buffer, $length);\nread($z, $buffer, $length, $offset);\ntell($z)\nseek($z, $position, $whence)\nbinmode($z)\nfileno($z)\neof($z)\nclose($z)\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module provides a Perl interface that allows the reading of files/buffers that have been\ncompressed with a variety of compression libraries.\n\nThe formats supported are:\n\nRFC 1950\nRFC 1951 (optionally)\ngzip (RFC 1952)\nzip\nzstd (Zstandard)\nbzip2\nlzop\nlzf\nlzma\nlzip\nxz\n\nThe module will auto-detect which, if any, of the supported compression formats is being used.\n",
                "subsections": []
            },
            "Functional Interface": {
                "content": "A top-level function, \"anyuncompress\", is provided to carry out \"one-shot\" uncompression between\nbuffers and/or files. For finer control over the uncompression process, see the \"OO Interface\"\nsection.\n\nuse IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\n\nanyuncompress $inputfilenameorreference => $outputfilenameorreference [,OPTS]\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n\nThe functional interface needs Perl5.005 or better.\n\nanyuncompress $inputfilenameorreference => $outputfilenameorreference [, OPTS]\n\"anyuncompress\" expects at least two parameters, $inputfilenameorreference and\n$outputfilenameorreference and zero or more optional parameters (see \"Optional Parameters\")\n\nThe $inputfilenameorreference parameter\nThe parameter, $inputfilenameorreference, is used to define the source of the compressed\ndata.\n\nIt can take one of the following forms:\n\nA filename\nIf the $inputfilenameorreference parameter is a simple scalar, it is assumed to be a\nfilename. This file will be opened for reading and the input data will be read from it.\n\nA filehandle\nIf the $inputfilenameorreference parameter is a filehandle, the input data will be read\nfrom it. The string '-' can be used as an alias for standard input.\n\nA scalar reference\nIf $inputfilenameorreference is a scalar reference, the input data will be read from\n$$inputfilenameorreference.\n\nAn array reference\nIf $inputfilenameorreference is an array reference, each element in the array must be a\nfilename.\n\nThe input data will be read from each file in turn.\n\nThe complete array will be walked to ensure that it only contains valid filenames before\nany data is uncompressed.\n\nAn Input FileGlob string\nIf $inputfilenameorreference is a string that is delimited by the characters \"<\" and \">\"\n\"anyuncompress\" will assume that it is an *input fileglob string*. The input is the list of\nfiles that match the fileglob.\n\nSee File::GlobMapper for more details.\n\nIf the $inputfilenameorreference parameter is any other type, \"undef\" will be returned.\n\nThe $outputfilenameorreference parameter\nThe parameter $outputfilenameorreference is used to control the destination of the\nuncompressed data. This parameter can take one of these forms.\n\nA filename\nIf the $outputfilenameorreference parameter is a simple scalar, it is assumed to be a\nfilename. This file will be opened for writing and the uncompressed data will be written to\nit.\n\nA filehandle\nIf the $outputfilenameorreference parameter is a filehandle, the uncompressed data will\nbe written to it. The string '-' can be used as an alias for standard output.\n\nA scalar reference\nIf $outputfilenameorreference is a scalar reference, the uncompressed data will be\nstored in $$outputfilenameorreference.\n\nAn Array Reference\nIf $outputfilenameorreference is an array reference, the uncompressed data will be\npushed onto the array.\n\nAn Output FileGlob\nIf $outputfilenameorreference is a string that is delimited by the characters \"<\" and\n\">\" \"anyuncompress\" will assume that it is an *output fileglob string*. The output is the\nlist of files that match the fileglob.\n\nWhen $outputfilenameorreference is an fileglob string, $inputfilenameorreference must\nalso be a fileglob string. Anything else is an error.\n\nSee File::GlobMapper for more details.\n\nIf the $outputfilenameorreference parameter is any other type, \"undef\" will be returned.\n",
                "subsections": [
                    {
                        "name": "Notes",
                        "content": "When $inputfilenameorreference maps to multiple compressed files/buffers and\n$outputfilenameorreference is a single file/buffer, after uncompression\n$outputfilenameorreference will contain a concatenation of all the uncompressed data from\neach of the input files/buffers.\n"
                    },
                    {
                        "name": "Optional Parameters",
                        "content": "The optional parameters for the one-shot function \"anyuncompress\" are (for the most part)\nidentical to those used with the OO interface defined in the \"Constructor Options\" section. The\nexceptions are listed below\n\n\"AutoClose => 0|1\"\nThis option applies to any input or output data streams to \"anyuncompress\" that are\nfilehandles.\n\nIf \"AutoClose\" is specified, and the value is true, it will result in all input and/or\noutput filehandles being closed once \"anyuncompress\" has completed.\n\nThis parameter defaults to 0.\n\n\"BinModeOut => 0|1\"\nThis option is now a no-op. All files will be written in binmode.\n\n\"Append => 0|1\"\nThe behaviour of this option is dependent on the type of output data stream.\n\n*    A Buffer\n\nIf \"Append\" is enabled, all uncompressed data will be append to the end of the output\nbuffer. Otherwise the output buffer will be cleared before any uncompressed data is\nwritten to it.\n\n*    A Filename\n\nIf \"Append\" is enabled, the file will be opened in append mode. Otherwise the contents\nof the file, if any, will be truncated before any uncompressed data is written to it.\n\n*    A Filehandle\n\nIf \"Append\" is enabled, the filehandle will be positioned to the end of the file via a\ncall to \"seek\" before any uncompressed data is written to it. Otherwise the file\npointer will not be moved.\n\nWhen \"Append\" is specified, and set to true, it will *append* all uncompressed data to the\noutput data stream.\n\nSo when the output is a filehandle it will carry out a seek to the eof before writing any\nuncompressed data. If the output is a filename, it will be opened for appending. If the\noutput is a buffer, all uncompressed data will be appended to the existing buffer.\n\nConversely when \"Append\" is not specified, or it is present and is set to false, it will\noperate as follows.\n\nWhen the output is a filename, it will truncate the contents of the file before writing any\nuncompressed data. If the output is a filehandle its position will not be changed. If the\noutput is a buffer, it will be wiped before any uncompressed data is output.\n\nDefaults to 0.\n\n\"MultiStream => 0|1\"\nIf the input file/buffer contains multiple compressed data streams, this option will\nuncompress the whole lot as a single data stream.\n\nDefaults to 0.\n\n\"TrailingData => $scalar\"\nReturns the data, if any, that is present immediately after the compressed data stream once\nuncompression is complete.\n\nThis option can be used when there is useful information immediately following the\ncompressed data stream, and you don't know the length of the compressed data stream.\n\nIf the input is a buffer, \"trailingData\" will return everything from the end of the\ncompressed data stream to the end of the buffer.\n\nIf the input is a filehandle, \"trailingData\" will return the data that is left in the\nfilehandle input buffer once the end of the compressed data stream has been reached. You\ncan then use the filehandle to read the rest of the input file.\n\nDon't bother using \"trailingData\" if the input is a filename.\n\nIf you know the length of the compressed data stream before you start uncompressing, you\ncan avoid having to use \"trailingData\" by setting the \"InputLength\" option.\n"
                    },
                    {
                        "name": "Examples",
                        "content": "To read the contents of the file \"file1.txt.Compressed\" and write the uncompressed data to the\nfile \"file1.txt\".\n\nuse strict ;\nuse warnings ;\nuse IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\n\nmy $input = \"file1.txt.Compressed\";\nmy $output = \"file1.txt\";\nanyuncompress $input => $output\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n\nTo read from an existing Perl filehandle, $input, and write the uncompressed data to a buffer,\n$buffer.\n\nuse strict ;\nuse warnings ;\nuse IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\nuse IO::File ;\n\nmy $input = IO::File->new( \"<file1.txt.Compressed\" )\nor die \"Cannot open 'file1.txt.Compressed': $!\\n\" ;\nmy $buffer ;\nanyuncompress $input => \\$buffer\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n\nTo uncompress all files in the directory \"/my/home\" that match \"*.txt.Compressed\" and store the\ncompressed data in the same directory\n\nuse strict ;\nuse warnings ;\nuse IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\n\nanyuncompress '</my/home/*.txt.Compressed>' => '</my/home/#1.txt>'\nor die \"anyuncompress failed: $AnyUncompressError\\n\";\n\nand if you want to compress each file one at a time, this will do the trick\n\nuse strict ;\nuse warnings ;\nuse IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\n\nfor my $input ( glob \"/my/home/*.txt.Compressed\" )\n{\nmy $output = $input;\n$output =~ s/.Compressed// ;\nanyuncompress $input => $output\nor die \"Error compressing '$input': $AnyUncompressError\\n\";\n}\n\nOO Interface"
                    },
                    {
                        "name": "Constructor",
                        "content": "The format of the constructor for IO::Uncompress::AnyUncompress is shown below\n\nmy $z = IO::Uncompress::AnyUncompress->new( $input [OPTS] )\nor die \"IO::Uncompress::AnyUncompress failed: $AnyUncompressError\\n\";\n\nReturns an \"IO::Uncompress::AnyUncompress\" object on success and undef on failure. The variable\n$AnyUncompressError will contain an error message on failure.\n\nIf you are running Perl 5.005 or better the object, $z, returned from\nIO::Uncompress::AnyUncompress can be used exactly like an IO::File filehandle. This means that\nall normal input file operations can be carried out with $z. For example, to read a line from a\ncompressed file/buffer you can use either of these forms\n\n$line = $z->getline();\n$line = <$z>;\n\nThe mandatory parameter $input is used to determine the source of the compressed data. This\nparameter can take one of three forms.\n\nA filename\nIf the $input parameter is a scalar, it is assumed to be a filename. This file will be\nopened for reading and the compressed data will be read from it.\n\nA filehandle\nIf the $input parameter is a filehandle, the compressed data will be read from it. The\nstring '-' can be used as an alias for standard input.\n\nA scalar reference\nIf $input is a scalar reference, the compressed data will be read from $$input.\n"
                    },
                    {
                        "name": "Constructor Options",
                        "content": "The option names defined below are case insensitive and can be optionally prefixed by a '-'. So\nall of the following are valid\n"
                    },
                    {
                        "name": "-AutoClose",
                        "content": ""
                    },
                    {
                        "name": "-autoclose",
                        "content": "AUTOCLOSE\nautoclose\n\nOPTS is a combination of the following options:\n\n\"AutoClose => 0|1\"\nThis option is only valid when the $input parameter is a filehandle. If specified, and the\nvalue is true, it will result in the file being closed once either the \"close\" method is\ncalled or the IO::Uncompress::AnyUncompress object is destroyed.\n\nThis parameter defaults to 0.\n\n\"MultiStream => 0|1\"\nAllows multiple concatenated compressed streams to be treated as a single compressed\nstream. Decompression will stop once either the end of the file/buffer is reached, an error\nis encountered (premature eof, corrupt compressed data) or the end of a stream is not\nimmediately followed by the start of another stream.\n\nThis parameter defaults to 0.\n\n\"Prime => $string\"\nThis option will uncompress the contents of $string before processing the input\nfile/buffer.\n\nThis option can be useful when the compressed data is embedded in another file/data\nstructure and it is not possible to work out where the compressed data begins without\nhaving to read the first few bytes. If this is the case, the uncompression can be *primed*\nwith these bytes using this option.\n\n\"Transparent => 0|1\"\nIf this option is set and the input file/buffer is not compressed data, the module will\nallow reading of it anyway.\n\nIn addition, if the input file/buffer does contain compressed data and there is\nnon-compressed data immediately following it, setting this option will make this module\ntreat the whole file/buffer as a single data stream.\n\nThis option defaults to 1.\n\n\"BlockSize => $num\"\nWhen reading the compressed input data, IO::Uncompress::AnyUncompress will read it in\nblocks of $num bytes.\n\nThis option defaults to 4096.\n\n\"InputLength => $size\"\nWhen present this option will limit the number of compressed bytes read from the input\nfile/buffer to $size. This option can be used in the situation where there is useful data\ndirectly after the compressed data stream and you know beforehand the exact length of the\ncompressed data stream.\n\nThis option is mostly used when reading from a filehandle, in which case the file pointer\nwill be left pointing to the first byte directly after the compressed data stream.\n\nThis option defaults to off.\n\n\"Append => 0|1\"\nThis option controls what the \"read\" method does with uncompressed data.\n\nIf set to 1, all uncompressed data will be appended to the output parameter of the \"read\"\nmethod.\n\nIf set to 0, the contents of the output parameter of the \"read\" method will be overwritten\nby the uncompressed data.\n\nDefaults to 0.\n\n\"Strict => 0|1\"\nThis option controls whether the extra checks defined below are used when carrying out the\ndecompression. When Strict is on, the extra tests are carried out, when Strict is off they\nare not.\n\nThe default for this option is off.\n\n\"RawInflate => 0|1\"\nWhen auto-detecting the compressed format, try to test for raw-deflate (RFC 1951) content\nusing the \"IO::Uncompress::RawInflate\" module.\n\nThe reason this is not default behaviour is because RFC 1951 content can only be detected\nby attempting to uncompress it. This process is error prone and can result is false\npositives.\n\nDefaults to 0.\n\n\"UnLzma => 0|1\"\nWhen auto-detecting the compressed format, try to test for lzmaalone content using the\n\"IO::Uncompress::UnLzma\" module.\n\nThe reason this is not default behaviour is because lzmaalone content can only be detected\nby attempting to uncompress it. This process is error prone and can result is false\npositives.\n\nDefaults to 0.\n"
                    },
                    {
                        "name": "Examples",
                        "content": "TODO\n"
                    }
                ]
            },
            "Methods": {
                "content": "read\nUsage is\n\n$status = $z->read($buffer)\n\nReads a block of compressed data (the size of the compressed block is determined by the \"Buffer\"\noption in the constructor), uncompresses it and writes any uncompressed data into $buffer. If\nthe \"Append\" parameter is set in the constructor, the uncompressed data will be appended to the\n$buffer parameter. Otherwise $buffer will be overwritten.\n\nReturns the number of uncompressed bytes written to $buffer, zero if eof or a negative number on\nerror.\n\nread\nUsage is\n\n$status = $z->read($buffer, $length)\n$status = $z->read($buffer, $length, $offset)\n\n$status = read($z, $buffer, $length)\n$status = read($z, $buffer, $length, $offset)\n\nAttempt to read $length bytes of uncompressed data into $buffer.\n\nThe main difference between this form of the \"read\" method and the previous one, is that this\none will attempt to return *exactly* $length bytes. The only circumstances that this function\nwill not is if end-of-file or an IO error is encountered.\n\nReturns the number of uncompressed bytes written to $buffer, zero if eof or a negative number on\nerror.\n\ngetline\nUsage is\n\n$line = $z->getline()\n$line = <$z>\n\nReads a single line.\n\nThis method fully supports the use of the variable $/ (or $INPUTRECORDSEPARATOR or $RS when\n\"English\" is in use) to determine what constitutes an end of line. Paragraph mode, record mode\nand file slurp mode are all supported.\n\ngetc\nUsage is\n\n$char = $z->getc()\n\nRead a single character.\n\nungetc\nUsage is\n\n$char = $z->ungetc($string)\n\ngetHeaderInfo\nUsage is\n\n$hdr  = $z->getHeaderInfo();\n@hdrs = $z->getHeaderInfo();\n\nThis method returns either a hash reference (in scalar context) or a list or hash references (in\narray context) that contains information about each of the header fields in the compressed data",
                "subsections": [
                    {
                        "name": "stream",
                        "content": "tell\nUsage is\n\n$z->tell()\ntell $z\n\nReturns the uncompressed file offset.\n\neof\nUsage is\n\n$z->eof();\neof($z);\n\nReturns true if the end of the compressed input stream has been reached.\n\nseek\n$z->seek($position, $whence);\nseek($z, $position, $whence);\n\nProvides a sub-set of the \"seek\" functionality, with the restriction that it is only legal to\nseek forward in the input file/buffer. It is a fatal error to attempt to seek backward.\n\nNote that the implementation of \"seek\" in this module does not provide true random access to a\ncompressed file/buffer. It works by uncompressing data from the current offset in the\nfile/buffer until it reaches the uncompressed offset specified in the parameters to \"seek\". For\nvery small files this may be acceptable behaviour. For large files it may cause an unacceptable\ndelay.\n\nThe $whence parameter takes one the usual values, namely SEEKSET, SEEKCUR or SEEKEND.\n\nReturns 1 on success, 0 on failure.\n\nbinmode\nUsage is\n\n$z->binmode\nbinmode $z ;\n\nThis is a noop provided for completeness.\n\nopened\n$z->opened()\n\nReturns true if the object currently refers to a opened file/buffer.\n\nautoflush\nmy $prev = $z->autoflush()\nmy $prev = $z->autoflush(EXPR)\n\nIf the $z object is associated with a file or a filehandle, this method returns the current\nautoflush setting for the underlying filehandle. If \"EXPR\" is present, and is non-zero, it will\nenable flushing after every write/print operation.\n\nIf $z is associated with a buffer, this method has no effect and always returns \"undef\".\n\nNote that the special variable $| cannot be used to set or retrieve the autoflush setting.\n\ninputlinenumber\n$z->inputlinenumber()\n$z->inputlinenumber(EXPR)\n\nReturns the current uncompressed line number. If \"EXPR\" is present it has the effect of setting\nthe line number. Note that setting the line number does not change the current position within\nthe file/buffer being read.\n\nThe contents of $/ are used to determine what constitutes a line terminator.\n\nfileno\n$z->fileno()\nfileno($z)\n\nIf the $z object is associated with a file or a filehandle, \"fileno\" will return the underlying\nfile descriptor. Once the \"close\" method is called \"fileno\" will return \"undef\".\n\nIf the $z object is associated with a buffer, this method will return \"undef\".\n\nclose\n$z->close() ;\nclose $z ;\n\nCloses the output file/buffer.\n\nFor most versions of Perl this method will be automatically invoked if the\nIO::Uncompress::AnyUncompress object is destroyed (either explicitly or by the variable with the\nreference to the object going out of scope). The exceptions are Perl versions 5.005 through\n5.00504 and 5.8.0. In these cases, the \"close\" method will be called automatically, but not\nuntil global destruction of all live objects when the program is terminating.\n\nTherefore, if you want your scripts to be able to run on all versions of Perl, you should call\n\"close\" explicitly and not rely on automatic closing.\n\nReturns true on success, otherwise 0.\n\nIf the \"AutoClose\" option has been enabled when the IO::Uncompress::AnyUncompress object was\ncreated, and the object is associated with a file, the underlying file will also be closed.\n\nnextStream\nUsage is\n\nmy $status = $z->nextStream();\n\nSkips to the next compressed data stream in the input file/buffer. If a new compressed data\nstream is found, the eof marker will be cleared and $. will be reset to 0.\n\nReturns 1 if a new stream was found, 0 if none was found, and -1 if an error was encountered.\n\ntrailingData\nUsage is\n\nmy $data = $z->trailingData();\n\nReturns the data, if any, that is present immediately after the compressed data stream once\nuncompression is complete. It only makes sense to call this method once the end of the\ncompressed data stream has been encountered.\n\nThis option can be used when there is useful information immediately following the compressed\ndata stream, and you don't know the length of the compressed data stream.\n\nIf the input is a buffer, \"trailingData\" will return everything from the end of the compressed\ndata stream to the end of the buffer.\n\nIf the input is a filehandle, \"trailingData\" will return the data that is left in the filehandle\ninput buffer once the end of the compressed data stream has been reached. You can then use the\nfilehandle to read the rest of the input file.\n\nDon't bother using \"trailingData\" if the input is a filename.\n\nIf you know the length of the compressed data stream before you start uncompressing, you can\navoid having to use \"trailingData\" by setting the \"InputLength\" option in the constructor.\n"
                    }
                ]
            },
            "Importing": {
                "content": "No symbolic constants are required by IO::Uncompress::AnyUncompress at present.\n\n:all Imports \"anyuncompress\" and $AnyUncompressError. Same as doing this\n\nuse IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "",
                "subsections": []
            },
            "SUPPORT": {
                "content": "General feedback/questions/bug reports should be sent to\n<https://github.com/pmqs/IO-Compress/issues> (preferred) or\n<https://rt.cpan.org/Public/Dist/Display.html?Name=IO-Compress>.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Compress::Zlib, IO::Compress::Gzip, IO::Uncompress::Gunzip, IO::Compress::Deflate,\nIO::Uncompress::Inflate, IO::Compress::RawDeflate, IO::Uncompress::RawInflate,\nIO::Compress::Bzip2, IO::Uncompress::Bunzip2, IO::Compress::Lzma, IO::Uncompress::UnLzma,\nIO::Compress::Xz, IO::Uncompress::UnXz, IO::Compress::Lzip, IO::Uncompress::UnLzip,\nIO::Compress::Lzop, IO::Uncompress::UnLzop, IO::Compress::Lzf, IO::Uncompress::UnLzf,\nIO::Compress::Zstd, IO::Uncompress::UnZstd, IO::Uncompress::AnyInflate\n\nIO::Compress::FAQ\n\nFile::GlobMapper, Archive::Zip, Archive::Tar, IO::Zlib\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "This module was written by Paul Marquess, \"pmqs@cpan.org\".\n",
                "subsections": []
            },
            "MODIFICATION HISTORY": {
                "content": "See the Changes file.\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "Copyright (c) 2005-2021 Paul Marquess. All rights reserved.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            }
        }
    }
}