Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Recommendation to zip/unzip gzip files

by mrguy123 (Hermit)
on Jul 03, 2012 at 13:21 UTC ( [id://979697]=note: print w/replies, xml ) Need Help??


in reply to Recommendation to zip/unzip gzip files

Hi there,
I don't have much experience in gzipping files, but recently I needed to parse a gzipped file with size of about 15 GB (~60 GB after decompression)
I used this fairly simple code to open it
##Open file - special case for gzip if ($input_file =~ /\.gz$/) { open(IN, "gunzip -c $input_file |") || die "can't open pipe to + $input_file"; }
I then parsed it like a regular file and it took me about a minute (amazingly fast)
Hope this helps
Mister Guy



About half of the world's greatest inventions were invented by single men trying to impress women. The other half were invented by married men looking for an excuse to get out of the house

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-25 07:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found