This is a plain C header library lightly adapted from the SimpleHacks QDEC library. Find the original source here: https://github.com/SimpleHacks/QDEC