fully ported #readHeadBytes to C++-Addon