CompressBzip2

Compression with the Bzip2 algorithm.

Although having better compression capabilities than Zlib (deflate), Bzip2 has poor latenty when it comes to streaming. I.e. it can swallow several Mb of data before starting to produce output. If streaming latenty is an important factor, deflate/inflate should be the favorite algorithm.

This algorithm does not support resource reuse, so calling reset is equivalent to a call to end followed by initialize. (but the same instance of stream is kept).

Members

Aliases

Stream
alias Stream = Bz2Stream
Undocumented in source.

Functions

end
void end(Stream stream)
Undocumented in source. Be warned that the author may not have intended to support it.
initialize
Stream initialize()
Undocumented in source. Be warned that the author may not have intended to support it.
process
Flag!"streamEnded" process(Stream stream, Flag!"lastChunk" lastChunk)
Undocumented in source. Be warned that the author may not have intended to support it.
reset
void reset(Stream stream)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

blockSize100k
int blockSize100k;
verbosity
int verbosity;
workFactor
int workFactor;

Advanced Bzip2 parameters See Bzip2 documentation https://www.sourceware.org/bzip2/manual/manual.html#bzcompress-init

Meta