|
|
| Line 46: |
Line 46: |
|
| |
|
| == Q & A == | | == Q & A == |
| * '''How to make the file uncompressed and aligned in packaged app?'''
| |
| : For keyboard app, put the file |metadata.json| in gaia/apps/keyboard to indicate the file to be memory-mapped, below is an example.
| |
| {
| |
| "external": false,
| |
| "zip": {
| |
| "mmap_files": [
| |
| "js/imes/latin/dictionaries/en_us.dict",
| |
| "js/imes/jszhuyin/data/database.data"
| |
| ]
| |
| }
| |
| }
| |
|
| |
| $ unzip -v gaia/profile/webapps/keyboard.gaiamobile.org/application.zip | grep Stored
| |
| 1451390 Stored 1451390 0% 1970-01-01 08:00 3d22f787 js/imes/latin/dictionaries/en_us.dict
| |
| 4541832 Stored 4541832 0% 1970-01-01 08:00 426a7f8e js/imes/jszhuyin/data/database.data
| |
|
| |
| : For more information, please see https://bugzilla.mozilla.org/show_bug.cgi?id=957497
| |
|
| |
| * '''How to know if the array buffer is memory-mapped in an XHR response?''' | | * '''How to know if the array buffer is memory-mapped in an XHR response?''' |
| : The Content-Type header is "application/mem-mapped" in such response. | | : The Content-Type header is "application/mem-mapped" in such response. |