Ilmari Karonen wrote: > Robert Rohde wrote: >> On Thu, Mar 26, 2009 at 12:09 PM, Ilmari Karonen <nos...@vyznev.net> wrote: >>> Hmm? Admittedly, I don't know the bzip2 format very well, but as far as >>> I understand it, there should be no bit-shifting involved: each block in >>> the stream is a completely independent, self-contained sequence of bytes. >> I believe the point is that each block is a self-contained sequence of >> bits not bytes, so a block can terminate in the middle of a byte. The >> next block is appended immediately (if I understand correctly), so >> block boundaries do not necessarily align to byte boundaries. Hence >> the need to do bit shifting. > > The Wikipedia article (what else?) on the format says the blocks are > padded to byte boundaries, and some quick testing seems to support that.
I'm not so sure about it. I first tried to flush blocks instead of starting a new bzip2 file but couldn't read it back. bzip2recover output looked like they weren't on byte boundaries (the bits weren't multiple of 8). _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l