consolidated logic. appendBits(runLength,bit) replaces appendFill0() and appendFill1()