get text size and data size from header