Added API for read/write common integer sizes from/to memory