Started header generation

Working on estimating and writing filesize to header