This is in preparation for adding sparse image support, to avoid cluttering the more critical reading and writing logic. Bug: 79173901 Test: N/A Change-Id: Icdddb849aebba4adf18a3e63ffbd3f36adda812d