METHOD AND SYSTEM FOR COMPRESSION IN BLOCK-BASED STORAGE SYSTEMS
In a method used for dictionary-based compression in a block-based storage system, a stored block of data that is similar to a received block of data is identified. A dictionary based on the stored block of data is determined. The received block of data is compressed based on the dictionary based on the stored block of data. The compressed, received block of data is stored with an association to the stored block of data.
1 . A method for dictionary-based compression in a block-based storage system, the method comprising:
in response to receiving a block of data, identifying, by a processor of the block-based storage system, a stored block of data that is similar to the received block of data;
in response to the identifying, creating a dictionary based on the stored block of data;
compressing the received block of data based on the dictionary based on the stored block of data; and
storing the compressed, received block of data with an association to the stored block of data.
2 . The method of claim 1 , wherein identifying the stored block of data that is similar to the received block of data comprises:
determining a similarity hash value of the received block of data.
3 . The method of claim 2 , wherein identifying the stored block of data that is similar to the received block of data further comprises:
comparing the similarity hash value of the received block of data to similarity hash values of stored blocks of data.
4 . The method of claim 3 , wherein identifying the stored block of data that is similar to the received block of data further comprises:
selecting a stored block of data whose similarity hash value falls within a threshold of the similarity hash value of the received block of data.
5 . (canceled)
6 . The method of claim 1 , wherein determining the dictionary based on the stored block of data comprises:
using the stored block of data as raw data for the dictionary.
7 . A system for dictionary-based compression in a block-based storage system, the system including a processor configured to:
in response to receiving a block of data, identify a stored block of data that is similar to the received block of data;
in response to the identifying, creating a dictionary based on the stored block of data;
compress the received block of data based on the dictionary based on the stored block of data; and
store the compressed, received block of data with an association to the stored block of data.
8 . The system of claim 7 , wherein the processor is further configured to:
determine a similarity hash value of the received block of data.
9 . The system of claim 8 , wherein the processor is further configured to:
compare the similarity hash value of the received block of data to similarity hash values of stored blocks of data.
10 . The system of claim 9 , wherein the processor is further configured to:
select a stored block of data whose similarity hash value falls within a threshold of the similarity hash value of the received block of data.
11 . (canceled)
12 . The system of claim 7 , wherein the processor is further configured to:
use the stored block of data as raw data for the dictionary.