Added more helpers to the D bindings.
Added endian flipping code.