]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/DSdeflate.pm
dsdeflate: shorten scope of initial buffer
[public-inbox.git] / lib / PublicInbox / DSdeflate.pm
index b5208e4368abd63626cf617eda1bd4ba4f00fb08..bf0ecd3877c79295ed99c90c0e2f750f730b6bfe 100644 (file)
@@ -27,10 +27,10 @@ my %IN_OPT = (
 );
 
 # global deflate context and buffer
-my $zbuf = \(my $buf = '');
-my $zout;
+my ($zout, $zbuf);
 {
        my $err;
+       $zbuf = \(my $initial = ''); # replaced by $next in zflush/write
        ($zout, $err) = Compress::Raw::Zlib::Deflate->new(
                # nnrpd (INN) and Compress::Raw::Zlib favor MemLevel=9,
                # the zlib C library and git use MemLevel=8 as the default