As Slawek observed, expanding runs of the value zero in RLE encoded coverage data is both pointless and expensive. A simple optimisation is to avoid all together by checking the value of the run before expanding.
As Slawek observed, expanding runs of the value zero in RLE encoded coverage data is both pointless and expensive. A simple optimisation is to avoid all together by checking the value of the run before expanding.