[sword-devel] I would like to write a PHP interface + copy-right of ZIP question

Chris Little sword-devel@crosswire.org
Mon, 24 Mar 2003 15:40:33 -0700 (MST)


> 1)
> I would like to write a PHP interface to read the bible modules (at first).
> Can one of you provide the structure and encoding/decoding algorithms for
> the modules?

You should consider using the PHP bindings for Sword provided through 
SWIG.  This is ABSOLUTELY the ONLY way you can expect to provide good 
support for Sword modules.  (In other words, if you want to support Sword 
modules, you must somehow use the Sword library itself.)  People often 
(lately quite often) talk of providing Sword module compatability through 
re-implementation.  It is possible, but the only effort that I believe 
will succeed is that of JSword.

The formats are not documented except through our C++ source code.  That
is your only clue about how the formats work (and there are 4 basic module
types multiplied by 3 variations on average multiplied by 3 possibilities
for compression multiplied by 2 possibilities for encryption).  Also, if 
you DO use our code, even just as documentation, re-writing everything 
yourself, you must GPL your work.  If you do not wish to GPL your work, 
your only option is to reverse engineer the modules themselves to figure 
out the format.

> 2)
> As far as I have seen the config files talk about ZIP encoding. If I'm
> correct that's based of the same algoritm als GIF files. PHP GD did stop the
> support for GIF files because of copyright problems.
> Is this copyright thing not a problem for this project (e.g. did you get a
> free green light)?
> Just a notice, I'm not up-to-date with this copyright thing.

This is a patent issue.  GIF uses the LZW algorithm patented by Unisys.  
Zip is a different algorithm.

--Chris