#620772 bzgrep can't use stdin

Package:
bzip2
Source:
bzip2
Description:
high-quality block-sorting file compressor - utilities
Submitter:
Date:
2021-11-14 19:09:02 UTC
Severity:
normal
#620772#5
Date:
2011-04-04 02:16:28 UTC
From:
To:
$ cat ... list1|
bzgrep -f - ~/backups/mw/data/radioscanningtw.20101120T230014.xml.bz2
egrep: Invalid range end

Huh, what did that have to do with egrep?

So I had to do
$ cat ... list1|
grep -f - ~/backups/mw/data/radioscanningtw.20101120T230014.xml
Which worked fine.

I didn't try the zgrep .gz case.

#620772#10
Date:
2021-11-14 19:05:38 UTC
From:
To:
This is still an issue in Debian Stretch with bzip2, Version 1.0.6,
6-Sept-2010.

bzip2 doesn't seem to pass the first 5000 bytes of uncompressed data from
stdin:

$ echo string | egrep string
string
$ echo string | zegrep string
string
$ echo string | bzegrep string
$

looking at the low-level programs:

$ echo string | gzip -cdfq
string
$ echo string | bzip2 -cdfq
$

Tests with cat-ing files instead of echo-ing show similar results, with
bytes after the 5000th being passed. All bytes are passed if the file is a
command line argument for bzegrep/bzip2.