kripken/emscripten — pull request #2581 by syl22-00 (2014-07-25 11:14:22+00:00)
Title: Embedding large files

When trying to package large files using `tools/file_packager.py`, if the file is large enough (like 20MB for browser JavaScript interpreters, or 40MB for node.js), the generated JavaScript array is too long and does not execute successfully.

The proposed fix creates that array by concatenating chunks, so that there is no line large than the limit.

This is necessary for instance in PocketSphinx.js which loads acoustic models sometimes having files as long as dozen of MB.

There is also a test in the core section: `test_file_large`, which takes a while to execute.