I have a very simple vocabulary app that searches and displays. It is built with a module Win32::GUI. I put all the text data needed for the dictionary in the section __DATA__. The script itself is very small, but with everything in the section __DATA__, its size reaches 30 MB. To share the work with my friends, I packed the script into a standalone executable file using the PP module utility PAR::Packerwith the highest compression level of 9, and now I have a dictionary with one application file about 17 MB in size.
But, although I really like the idea of a single-file script, placing such a huge amount of text data in a DATA script section does not seem right. Firstly, when I try to open a script in Padre (Notepad ++ is ok), I get an error that is similar:
Can't open my script as the script is over the arbitrary file size limit which is currently 500000.
My questions:
Does this bring me additional benefits, except for fixing the problem of opening the Padre file, if I translate everything in the DATA section into a separate text file?
If I do this, what should I do to reduce the size of a single file? Freeze it and unzip it while searching and displaying?
How do people usually format the text data needed for a dictionary application?
Any comments, ideas or suggestions? Thanks, as always :)
source
share