Answers.Body: <p>As for patents, it seems they should expire soon. </p>
  
  <p>As for tools, the compression ratio depends havily on the quality of foreground/background separation. My experience confirms that the commercial software is usually better in this respect.</p>
  
  <p>I should note however that Jakub Wilk's <a href="http://jwilk.net/software/didjvu" rel="nofollow">didjvu</a> allows to select one of several foreground/background separation algorithms. So at least in theory it allows to obtain a better compression than with the DjVuLibre tools.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-12T07:58:39.490Z
Answers.LastActivityDate: 2014-10-12T07:58:39.490Z
Answers.UserDisplayName: Janusz S. Bień
Answers.Body: <p>In my opinion the relative inaccessibility of DjVu's <code>libdjvu</code>, 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.</p>
  
  <hr>
  
  <p>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 <code>DJVU</code>) in the framework. That framework, in the form of <code>libdjvu</code>, is however used in all of the DjVuLibre tools (<code>bzz</code>. <code>djvu...</code>)</p>
  
  <p>The <code>libdjvu</code> 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.</p>
  
  <p>To complicate things, the bytestreams in the DjVu file format are compressed using a Burrows Wheeler encoder. The encoder is similar to <code>bzip2</code> 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.</p>
  
  <p>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 <code>djvutxt</code> and <code>bzz</code>. 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).</p>
  
  <p>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 <strong>always</strong> 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).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-12-23T06:34:47.157Z
Answers.LastActivityDate: 2013-12-23T12:17:01.680Z
Answers.LastEditDate: 2013-12-23T12:17:01.680Z
Answers.UserDisplayName: Anthon
Body: <p>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?</p>
  
  <p>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 <a href="http://djvu.sourceforge.net/">DjVuLibre</a> software is offered as free open-source software under the GNU Public License.</p>
  
  <p>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 <a href="http://code.google.com/p/comicflow/">ComicFlow</a>, another item of free open-source software under the GNU Public License.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2013-12-23T00:44:53.043Z
Comments.Text: I'm not totally sure on the reason so I am just going to take a guess. In order to have your app on the app store you need to pay $99 per year. Usually, free apps cover this by ads so my guess is that the developers of DjVu don't want to put ads in their app, thus resulting in it being a paid app.
Comments.UserDisplayName: aman207
Tags: <file-format><software><djvu>
Title: Does something about DjVu prevent making a free viewer on iOS?
UserDisplayName: minopret
ThreadText: # Does something about DjVu prevent making a free viewer on iOS?
  
  (Asked by: username_0 on 2013-12-22)
  
  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](http://djvu.sourceforge.net/) 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](http://code.google.com/p/comicflow/), another item of free open-source software under the GNU Public License.
  
  **Tags:** file-format, software, djvu
  
  > **Comments:**
  > **username_1**: I'm not totally sure on the reason so I am just going to take a guess. In order to have your app on the app store you need to pay $99 per year. Usually, free apps cover this by ads so my guess is that the developers of DjVu don't want to put ads in their app, thus resulting in it being a paid app.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2013-12-23. Score: 8 | Accepted 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—one of the first commercial things I developed in C++ was a library for creating GIF files in 1987—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).
  
  
  ---
  
  ### Answer by username_2 on 2014-10-12. Score: 1
  
  As for patents, it seems they should expire soon.
  
  As for tools, the compression ratio depends havily on the quality of foreground/background separation. My experience confirms that the commercial software is usually better in this respect.
  
  I should note however that Jakub Wilk's [didjvu](http://jwilk.net/software/didjvu) allows to select one of several foreground/background separation algorithms. So at least in theory it allows to obtain a better compression than with the DjVuLibre tools.
  
  
  ---
  
  