refactor run length coded bit vector generation