Writes value into buffer at its current position, in exactly size bytes.
buffer is little-endian. Implementations must leave its byte order alone.