Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: How to test if a file is gzipped or not

by sectokia (Pilgrim)
on Jun 17, 2024 at 23:25 UTC ( [id://11160047]=note: print w/replies, xml ) Need Help??


in reply to How to test if a file is gzipped or not

IO::Uncompress::AnyInflate will gunzip data, and has a Transparent option. The option is useful as you can select if you want non-gzipped data to just pass through and be returned as if it was the uncompressed result, or if you want it to throw an error.

  • Comment on Re: How to test if a file is gzipped or not

Replies are listed 'Best First'.
Re^2: How to test if a file is gzipped or not
by soonix (Canon) on Jun 18, 2024 at 07:35 UTC

    TIL IO::Uncompress::AnyInflate exists.

    I don't know if it's important for Special_K, but I read under "Transparent":
    In addition, if the input file/buffer does contain compressed data and there is non-compressed data immediately following it, setting this option will make this module treat the whole file/buffer as a single data stream.
    This might pose a security risk, if one isn't aware of it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11160047]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-09-13 09:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (18 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.