Patent ID: 8560552

Claim:
A method performed in an electronic device in a communication network, the method compressing a stream of data being transmitted in the communication network, the method comprising: providing a circular buffer for holding data blocks, the circular buffer being divided into fixed equidistant boundaries defining one or more patterns in the processed data blocks; providing an indexing table that maps a value to a location in the circular buffer corresponding to the value, each location in the circular buffer corresponding to a pattern whose length is defined by the fixed equidistant boundaries, wherein each pattern is represented in the indexing table; receiving an original data block; identifying one or more matching patterns that each correspond to a pattern in the original data block that matches a pattern in the circular buffer, each of the matching patterns identified at least in part by calculating a pattern hashing value on the pattern in the original data block and referencing the indexing table to locate the pattern in the circular buffer; generating an output comprising one or more commands identifying each of the matching patterns and, if the original data block comprises further information in addition to the matching patterns, the output comprises the further information; storing the output in a memory of the electronic device or transmitting the output to another device in the communication network; and updating the circular buffer based on the original data block, wherein updating the circular buffer based on the original data block comprises: maintaining a write position that serves as an index to where the original data block is written to the circular buffer, and updating the indexing table using the pattern hashing value only if the write position is adjacent to one of the fixed equidistant boundaries of the circular buffer.