Raised when a value doesn't fit in the type it is written as.
MemoryIO::IO.new(stream).write(0x100000041, as: :u32) # MemoryIO::ValueOutOfRangeError: 0x100000041 is out of range for 32-bit unsigned integer (0x0..0xffffffff)