title_body: Does something about DjVu prevent making a free viewer on iOS? Is there something about the technology and rights to the DjVu ebook format that explains why it's only available for iPhone by purchasing an app or by making an in-app purchase in a free app?
  
  I saw somewhere that DjVu depends on the use of certain patents. Does that have something to do with it? Because on the other hand, the DjVuLibre software is offered as free open-source software under the GNU Public License.
  
  I would guess that the rest of the software that a developer needs in order to create a free DjVu app for iPhone is present in ComicFlow, another item of free open-source software under the GNU Public License.
upvoted_answer: In my opinion the relative inaccessibility of DjVu's libdjvu, including having their own bytestream compression contributed to the low acceptance of the DjVu format over the years and not patent issues. This hinders other software developers adapting their software to support DjVu and even more so 
  when porting to a new platform.
  
  
  
  The DjVuLibre software has several characteristics that make it difficult to port. It is C++ based code that builds on a framework that seems to be generically usable, but is probably DjVuLibre specific. I conclude that on not having encountered the framework anywhere else, as well as specific names of classes, etc. that include the substring DJVU) in the framework. That framework, in the form of libdjvu, is however used in all of the DjVuLibre tools (bzz. djvu...)
  
  The libdjvu being a C++ library  makes it less portable and less accessible for being called from other languages (e.g. Python), than a C based library.
  
  To complicate things, the bytestreams in the DjVu file format are compressed using a Burrows Wheeler encoder. The encoder is similar to bzip2 but has its own, DjVu specific, implementation. This gives a small advantage over more standard compression schemes, but this is dwarfed by the conceptual better handling of compression of the images through the use of wavelet encoding and individually compressed layers.
  
  I analysed the DjVuLibre software some time ago, to extract OCR-ed text. I settled for a minimal Python implementation for that piece, as I could not get a Python program to hook up to the C++ libraries in a reasonable amount of time. I spent a few days getting the Python implementation to work, analysing the intransparent program flow of the library, all the while comparing the output with results from djvutxt and bzz. This resulted in the DJVU OCR extraction program included in Calibre. (The difficulties might be based on
  my lack of programming experience: I have been programming C++ since the late 80's&mdash;one of the first commercial things I developed in C++  was a library  for creating GIF files in 1987&mdash;and have used Python since the mid 90's).
  
  I must say I really like the DjVu concepts, and love the superior quality/filesize ratio, compared to scans in other file formats I have used. I always scan to .DjVu. But although I primarily work on a Linux system, the scanning/conversion process includes commercial software running on a Windows box that gives me even better compression results than the open DjVuLibre library does (as well as OCR without an additional program).