Abstract: A method for compressing (16) and decompressing files is provided. The method includes creating a list of shift-invariant focal points (108) of neighborhoods in the stream and comparing those focal points (108) to a list of focal points (106) created using the same method on the reference stream. The method of the present invention searches for the longest sequence of focal points (108) that appear in both files (102, 104). The method of the present invention also verifies that neighborhood contain the same focal points (108). The changed data and references to the reference stream are then encoded (114). The decompression process decodes the encoded stream of data (114), and using the reference stream recreates the new version of stream.