perlknight has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I know you could you use Net::LDAP::LDIF to read ldif file. But I am in a bit of a situation, my ldif file is gziped. When unzipped it's around 5Gbytes. I am wondering if there is a way of handling gzip file with Net::LDAP::LDIF file. Has anyone run into the same problem as I am? Thanks.

Replies are listed 'Best First'.
Re: ldif file
by gmargo (Hermit) on Dec 05, 2009 at 22:46 UTC

    It depends on what you are doing. Are you only reading the file, or writing it too? Net::LDAP::LDIF will take an open file handle as a constructor argument. If just reading, you could perhaps set up a stream where it reads from a gunzip process. If read/writing, perhaps it's best to just uncompress it on disk and recompress it afterwards.