compressBlock

fnCompressedBlock compressBlock(const(ubyte)[] input, int blockSize100k, uint originalDataCrc = 0)

Compress a block of RLE1-encoded data into a BZIP2 block.

Creates a local BitWriter, writes all block data, flushes to byte boundary, and returns the result. For streaming compression where the bitstream must continue beyond the block (e.g., EOS trailer), use compressBlockToWriter instead.

Parameters

inputRLE1-encoded input data.
blockSize100kBlock size multiplier (1-9).
originalDataCrcPre-computed CRC of original (pre-RLE1) data, or 0 to compute.

Returns

Compressed block data with blockCrc and data populated.