Implemented the find Match method

Please have a look at it, not sure if correct. Need to be used in the ASTCompression algo