Added reduced hash size optimisation and fixed compression calc
Added local cache