I am currently reading about the DEFLATE method for encoding/decoding data. I understand that the process is composed of two parts:
i. Replace duplicate information (within a specified window) with a reference back to the previous identical piece.
ii. Use Huffman coding to reduce the size of the most commonly occurring symbols.
I have a question with regards to (i). DEFLATE uses LZ77 which, based on a size window, searches through the information and, if it finds any duplicate information, replaces it with a "pointer". That makes perfect sense.
However, when decoding using LZ77 how does DEFLATE recognize a pointer? (Pointers are length-distance pairs; how can you discern if it's a pointer or just a number that was present in the initial data?)
Reference: http://en.wikipedia.org/wiki/DEFLATE#Duplicate_string_elimination