readValue, writeValue and fourCCToStr should really unpack and pack the values manually; the current version uses undefined behaviour