hap: Decode using optimal slices sizes