lib/PublicInbox/GzipFilter.pm | 8 ++++---- diff --git a/lib/PublicInbox/GzipFilter.pm b/lib/PublicInbox/GzipFilter.pm index 848370ce443b2a9398d73af284381a1af3531ffb..72ab5d50392309bf87babe87f00d953851e86342 100644 --- a/lib/PublicInbox/GzipFilter.pm +++ b/lib/PublicInbox/GzipFilter.pm @@ -94,15 +94,15 @@ } # for GetlineBody (via Qspawn) when NOT using $env->{'pi-httpd.async'} # Also used for ->getline callbacks -sub translate ($$) { - my $self = $_[0]; # $_[1] => input +sub translate { + my $self = shift; # $_[1] => input # allocate the zlib context lazily here, instead of in ->new. # Deflate contexts are memory-intensive and this object may # be sitting in the Qspawn limiter queue for a while. $self->{gz} //= gzip_or_die(); - if (defined $_[1]) { # my $buf = $_[1]; - zmore($self, $_[1]); + if (defined $_[0]) { # my $buf = $_[1]; + zmore($self, @_); length($self->{zbuf}) >= 8192 ? delete($self->{zbuf}) : ''; } else { # undef == EOF zflush($self);