using own binary reader
adding flag bytes number to extended header
adding method for reading integer with discarded msb
adding tag restrictions and crc data fields to extended header