if (size) means 'if (size is nonzero)'. 'if' statements are true if the value is any nonzero value. they are false if the term is 0.

a left shift puts a 0 in the first bit. the *byte |= bit is...