diff options
author | Eric Wong <e@80x24.org> | 2022-07-23 15:52:08 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-07-24 23:06:07 +0000 |
commit | 25fb42242320ffb55655d89268ddbb468eab9a6a (patch) | |
tree | bf95e18dd9debe04aa9b67b179ffa975ee396073 /lib/PublicInbox/DSdeflate.pm | |
parent | 2f8d15b1170b137a0512a4f3163b236a5dcbf0b8 (diff) | |
download | public-inbox-25fb42242320ffb55655d89268ddbb468eab9a6a.tar.gz |
There's no need to keep the initial buffer alive in package-wide scope once it's replaced by `$next' in ->write or ->zflush.
Diffstat (limited to 'lib/PublicInbox/DSdeflate.pm')
-rw-r--r-- | lib/PublicInbox/DSdeflate.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/DSdeflate.pm b/lib/PublicInbox/DSdeflate.pm index b5208e43..bf0ecd38 100644 --- a/lib/PublicInbox/DSdeflate.pm +++ b/lib/PublicInbox/DSdeflate.pm @@ -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 |