General BAFTools library