1. A method comprising: compressing a data stream by: segmenting at least portions of the data stream into segments based on content of the data stream; responsive to a respective segment being a recurring segment, replacing the segment with a corresponding reference; and responsive to a respective segment not being a recurring segment, creating a reference for the segment and replacing the segment with the created reference; and storing the compressed data in a storage system.