Did you google and look up the encoder jwatte listed?
Did you know what it does? and does it fit your needs?
Really, jwatte is pulling your leg by answering the exact question you asked (propably its the first encoder that poped into his head when reading the question, is this correct jwatte?).
There are many, many type of encoders so you need to tell us what you what the encoder to do.