Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

lzop vs. Compress::LZO

by aijin (Monk)
on May 23, 2001 at 18:30 UTC ( #82571=perlquestion: print w/replies, xml ) Need Help??
aijin has asked for the wisdom of the Perl Monks concerning the following question:

I have been giving the task of figuring out why, when a file is compressed with the lzop utility, an error is produced during decompression using the Compress::LZO module.

I don't know why the files are being compressed with lzop, but it's not code that I'm able to change, so I'm stuck with trying to figure out how to change things at my end.

I'm currently decompressing thusly:

my $decompedstring = Compress::LZO::decompress($compedstring); if (! defined $decompedstring) { print "Error decompressing string!"; } else { print $decompedstring; }
Unfortunately, all I'm getting is a undefined value returned, indicating an error.


Replies are listed 'Best First'.
Re: lzop vs. Compress::LZO
by rpc (Monk) on May 23, 2001 at 22:07 UTC
    I have been playing arould with lzop and Compress::LZO this morning after seeing your post. I don't believe the file format for lzop archives is compatable with Compress::LZO. Decompression is failing because lzop tacks on an archive header Compress::LZO does not understand. Compressing data with lzop and Compress::LZO::compress and comparing will show great differences. Getting this to work would require working knowledge of the lzop archive format; you would have to strip the header off. It looks like there are some endian issues as well.



Re: lzop vs. Compress::LZO
by DrSax (Sexton) on May 23, 2001 at 21:13 UTC
    I'm not familiar with the package you are trying to use (Compress::LZO), but I was wondering if you have stepped this one through the debugger. It is likely that the failure is occuring in the middle of a C library function called from a shared object that the package is loading, but you might get a better clue to the problem this way.
    Hope this helps a little...
Re: lzop vs. Compress::LZO
by fs (Monk) on May 23, 2001 at 22:30 UTC
    Is anything useful in the $! scalar?
    print "Error decompressing string: $!";
      Nothing at all, unfortunately. It was the first thing I checked.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://82571]
Approved by root
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2018-05-25 13:29 GMT
Find Nodes?
    Voting Booth?