I would probably change the names of write/read32bit to match the endianness they are satisfying. I think write32bit is "writeBE32bit" for write big-endian, isn't it? http://llvm-reviews.chandlerc.com/D2648