kspalaiologos / bzip3

A better and stronger spiritual successor to BZip2.
GNU Lesser General Public License v3.0
689 stars 38 forks source link

can't compress input from stdin? #134

Closed BlackMage2 closed 1 month ago

BlackMage2 commented 1 month ago

How i can compress input from stdin and output the bzip3 compressed content to stdout? (to forward them in bash for example to another program?

kspalaiologos commented 1 month ago

Please check the man page or the help screen; the behaviour is otherwise identical to this of bzip2:

% bzip3 --help | grep stdout
  -c, --stdout      force writing to standard output

Example:

% cat /usr/share/dict/words | tr a-z A-Z | bzip3 -cv | ent
    985084 -> 320319 bytes, 32.52%, 2.60 bpb
Entropy = 7.999407 bits per byte.

Optimum compression would reduce the size
of this 320319 byte file by 0 percent.

Chi square distribution for 320319 samples is 263.54, and randomly
would exceed this value 34.33 percent of the times.

Arithmetic mean value of data bytes is 127.6606 (127.5 = random).
Monte Carlo value for Pi is 3.143370921 (error 0.06 percent).
Serial correlation coefficient is 0.000315 (totally uncorrelated = 0.0).