- if (my $middle = $self->{cb}) {
- my $mime = $middle->();
- return feed_entry($self, $mime) if $mime;
- }
- delete $self->{cb} ? '</feed>' : undef;
+ my $buf = do {
+ if (my $middle = $self->{cb}) {
+ my $smsg = $middle->($self->{ctx});
+ feed_entry($self, $smsg) if $smsg;
+ }
+ } // (delete($self->{cb}) ? '</feed>' : undef);
+
+ # gzf may be GzipFilter, `undef' or `0'
+ my $gzf = $self->{gzf} or return $buf;
+
+ return $gzf->translate($buf) if defined $buf;
+ $self->{gzf} = 0; # next call to ->getline returns $buf (== undef)
+ $gzf->translate(undef);