1. A method, comprising: partitioning a plurality of data files into a plurality of data segments for deduplication; identifying a first subset of data segments from the plurality of data segments as infrequently accessed data segments; identifying a second subset of data segments from the plurality of data segments as frequently accessed data segments; compressing the first subset of data segments using a shared compression context, wherein a compressor examines patterns across the first subset of data segments to determine frequently occurring patterns during compression of the first subset of data segments; and compressing the second subset of data segments using a plurality of non-shared compression contexts.