1. An apparatus comprising: a memory unit for storing data streams; and a processor coupled to said memory unit, the processor configured to perform a compression operation and a deduplication operation in a single pass, said processor configured to: use a subset of data from a data stream to generate a reference data block corresponding to said subset of data; compute a first hash value for said subset of data and a second hash value for said reference block using a same function; compare the first hash value computed for said subset of data to the second hash value computed for said reference data block, wherein said first hash value and said second hash value are stored in separate hash tables; generate a compressed and deduplicated representation of said subset of data by at least modifying header data corresponding to said subset of data responsive to a detected match between said first hash value and said second hash value, wherein said compressed representation is generated using said reference data block responsive to the detection of the match between said first hash value and said second hash value, wherein said separate hash tables comprises a reference hash table and said second hash value is stored in said reference hash table; and initiate decompression procedures upon storing said reference data block in a memory buffer and upon generation of said compressed representation.