1. A method of determining if a query document matches one or more documents in a database, the method comprising: generating a bit profile of the query document based on the number of bits required to encode each of a plurality of rows of pixels in the document; and comparing the bit profile of the query document against bit profiles associated with a first plurality of documents from the database to determine if the query document matches one or more of the first plurality of documents.