It will write as much as it can, it will return the number of bits written.