This is the code for rank queries using poppy rank data structures and its derivative, cumulative poppy rank data structure, which I implemented and used in experiments of my seminar work in the Seminar on Scalability Challenges in Search Engines (University of Helsinki).