Conversation
|
tests passed |
|
Wouldn't this functionality be better suited as part of the demo application rather than pulling in the requirement to depend on an external tool being installed for the library? |
|
A better solution would be to use zlib. But that's an extra library dependence for Hunspell. |
|
This patch was designed to allow operation with a very small amount of disk space so unpacking the data before loading it is out of the question. gzip is already present (and very commonly present), and the fork is very low overhead. |
|
Of course unpacking data into temporary files on disk is unacceptable. But starting other processes is also unacceptable, because this is fragile, system dependent and may have security implications. Is there really no zlib library installed on your system to do unpacking on-the-flight inside of hunspell? |
This code implements a 'smart-open' sort of feature for dictionary files.
ending with .hz => open with hzip
ending with .gz => open with popen("gunzip -c")
otherwise attempt to open as a file,
if this fails, attempt to open .hz with hzip
if this fails, attempt to open .gz with popen("gunzip -c")