loca table fixes and added RLE encoding

don't we need a close?