I've just tried to upgrade to the newest version from 0.5 and was having problems reading my old data.
After hunting around I found an old bug report here (http://bugtracker.sharpdevelop.net/issue/ViewIssue.aspx?id=332&PROJID=2) that describes the exact same thing in 2005, but the bug report was never resolved.
After decompiling my old version of the library, I found that somewhere between 0.5 and the current version 2 bytes were added to the header - the static text "BZ" prior to the "h". These extra two bytes were being read in "Initialize" in BZip2InputStream
I wasn't sure as to the preferred method to submit patches, so here is a fix that will allow it to read both old and new data - modify the initialize method of BZip2InputStream as follows:
void Initialize()
{
char magic1 = BsGetUChar();
char magic2 = BsGetUChar();
// special code for old version headers (looks like 0.5.0 or so)
if (magic1 != 'B' || magic2 != 'Z')
{
if ((magic1 == 'h') && (magic2>='1'&&magic2<='9'))
{
SetDecompressStructureSizes(magic2 - '0');
computedCombinedCRC = 0;
return;
}
}
char magic3 = BsGetUChar();
char magic4 = BsGetUChar();
if (magic1 != 'B' || magic2 != 'Z' || magic3 != 'h' || magic4 < '1' || magic4 > '9') {
streamEnd = true;
return;
}
SetDecompressStructureSizes(magic4 - '0');
computedCombinedCRC = 0;
}