Control over `BFINAL` bit
Closed this issue · 2 comments
Hi,
I'm trying to concatenate raw DEFLATE blocks produced by isal_deflate_stateless()
. ISA-L appears to always set the BFINAL
bit on the last block of the output though. It also appears that it can produce multiple blocks, so it's not safe to just clear the first bit of the first byte.
The header says FULL_FLUSH will byte align the output deflate block so additional blocks can be easily appended
, so I'm hoping this scenario has been thought through before.
For comparison, I think zlib only sets BFINAL
when Z_FINISH
is used, and Z_FINISH
must be used at least once per stream.
Thanks-
Have you seen how the igzip cli program uses isal_deflate_stateless() to independently generate deflate blocks and concatenate them? https://github.com/intel/isa-l/blob/master/programs/igzip_cli.c#L533 It uses full_flush.
Ohh, it looks like end_of_stream
is what controls whether or not BFINAL
is set. Thanks for the pointer.