On Wed, Feb 06, 2008 at 01:58:00PM -0800, John Costello
wrote:
>
> I was about to install PerlIO::gzip when I encountered
this in the README:
>
> **DON'T** trust it with your data.
>
> The data isn't critical - I'm parsing mail logs - but
should be accurate.
>
> Tie::Gzip has the disadvantage of not warning doom, and
has a few
> interesting features.
>
> I'm curious whether there are strong feelings either
way, and whether
> Nicholas' warning is akin to someone saying,
"Here's a chef's knife.
> Don't slice off your hand."
Well, maybe I should remove that warning. It's mostly that
I'm not aware
that it's been battle tested enough to be confident that it
doesn't have
bugs, and it is the sort of thing where bugs could be data
loss bugs, and
could be silent data loss bugs. As in, "oops, this file
we compressed isn't
readable any more"
I've personally not been using it, but I don't have a need.
It was more
written because I could. It's also why there's been no drive
to work out
what it might do better to cope with threads. (Specifically,
what to do if
someone clones a thread while a file handle has a
PerlIO::gzip layer pushed
onto it)
PerlIO::gzip may well be faster (it is pure C, after all,
avoiding the tie
interface) but it doesn't do much other than compress and
uncompress data.
Nicholas Clark
|