aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java (follow)
Commit message (Collapse)AuthorAgeFilesLines
* [Refactor] Divide BinaryDictInputOutput into BinaryDictEncoder and ↵Yuichiro Hanada2013-08-151-1783/+0
| | | | | | BinaryDictDecoder. Change-Id: I7c3269d77e3e3b567e459dcaa1bc029903941744
* Add an initial JNI interface to dicttool.Jean Chalard2013-08-151-0/+8
| | | | | Bug: 10100269 Change-Id: I883992c2033e7d9e7c754c0bf653767728b221b6
* Revert "[Refactor] Divide BinaryDictInputOutput into BinaryDictInputUtils ↵Ken Wakasa2013-08-151-0/+1775
| | | | | | | | and BinaryDictOutputUtils." This reverts commit 4c63d0614e7ed7aea4bcbab3a17090d841661d92. Change-Id: I1fa277d720bab4d895259df7d6d82eebfa5eb6c5
* [Refactor] Divide BinaryDictInputOutput into BinaryDictInputUtils and ↵Yuichiro Hanada2013-08-151-1775/+0
| | | | | | BinaryDictOutputUtils. Change-Id: I0d476abe763c11ba9005152f928e8dccf15ac9de
* [Refactor] Move some helper methods to BinaryDictIOUtils.Yuichiro Hanada2013-08-151-66/+18
| | | | Change-Id: Ib817a975dc1f82241f732b236c44b042fda25b3c
* Move some constants in BinaryDictInputOutput to FormatSpec.Yuichiro Hanada2013-08-141-18/+11
| | | | Change-Id: I6b12faf35b65238b9a64c82d4d1a6050f980e72e
* Add BinaryDictReader.Yuichiro Hanada2013-08-131-6/+14
| | | | | | Bug: 9618601 Change-Id: Ief07fa0c3c4f7f5999a3fafcef4e47b6b6fd8143
* Make readHeader check the header size before using it.Yuichiro Hanada2013-08-131-2/+3
| | | | Change-Id: I5dc3e2b674f7343ef57317fde6bdb7349a7fe04c
* Remove the code and comments about version 1 format.Yuichiro Hanada2013-08-091-50/+33
| | | | Change-Id: I827052f234eeaa4dbcfd37da69a99866896a158b
* [FD4] Separate cached address before/after update for groupsJean Chalard2013-07-241-51/+71
| | | | | | | This should fix bug#8526576 for good. Bug: 8526576 Change-Id: I473aad26b69d64efa09d2ec9d8e69f29f5cf4819
* [FD3] Split stackNodes into two methods.Jean Chalard2013-07-241-16/+37
| | | | | | | | | | In the future we need to have a method that computes only from the size, as we used to have, to initialize the cached addresses, and a much simpler and faster method to copy the cached sizes. Bug: 8526576 Change-Id: I6a5a790303ab8f3bf957c7ca266eb12da7c1ad9e
* [FD2] Separate cached address before/after update for nodes.Jean Chalard2013-07-231-37/+59
| | | | | Bug: 8526576 Change-Id: Ib9f8594a9e12dc75eba296faff2612c4bd7483d3
* [FD1] Move parents' address computation outsideJean Chalard2013-07-171-3/+23
| | | | | | | | There is no need to do it repeatedly in this loop: it's clearer and faster to do it at the end only. Bug: 8526576 Change-Id: I707571179c89479830891ec6d4fd06a9fffed7c1
* Fix Binary dict testsJean Chalard2013-04-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two problems here. The first one is the tests would send an invalid unicode character. Although we could want dicttool to handle this more gracefully, it's fine for now. The second problem is much more serious. If a node has more than 128 children, then the java code will crash trying to read the dictionary back because of a bug that this change fixes. In theory, it's possible that happens when we try to load the user history dictionary back from the disk - native code is not affected so there is no other point that may cause a problem. In the practice, that means you'd need to have 129 words with a common prefix (including empty string) but all different after this. It's almost impossible with Google Keyboard since there are only so many keys on the keyboard that you can make a word out of, and then again you'd have to do it repeatedly until it actually enters the user history dictionary, wait for it to get saved on the disk. The bad news is, if you manage to get this far, the keyboard will crash every time and won't be able to get up until you clear data for the package. The good news is, the dictionary itself is not corrupted and only the reading code is wrong. So updating to a newer version would actually even recover from this situation. All in all, considering how almost-impossible this is to trigger, I don't think even a single user actually did hit this bug. Bug: 8583091 Change-Id: Iabb2a7f47cbd9ed3193d2a3487318d280753e071
* Fix Apache license commentTadashi G. Takaoka2013-01-211-8/+8
| | | | Change-Id: Ic56167f952a7f4449da366e1e81610e72c966086
* Small code cleanupsKen Wakasa2013-01-071-0/+1
| | | | | | Multi-project commit with I249d5fbe Change-Id: Ia28c4e970992aa1299a30e604eaa5d096655c3a5
* Remove a useless memberJean Chalard2012-12-111-2/+0
| | | | Change-Id: Id13e0aeec6ec3655d6bb0edc7f8f7821e7dc5a36
* Remove a couple Eclipse and Android Lint warningsJean Chalard2012-12-061-0/+2
| | | | Change-Id: I0c29c5d2abcbf80759b996d34b534deb083cd7d3
* Remove warningsJean Chalard2012-10-291-8/+4
| | | | | | Thanks Eclipse Change-Id: I88e3979ed22be5d8be5a5accdde417c6b1a8bf2d
* Add auto detection and decoding of dictionary files. (A2)Jean Chalard2012-10-251-2/+9
| | | | | Bug: 7388852 Change-Id: I25e755fc15f5b383acc046f668e9681efa4f0c2f
* Return the correct bigram frequencyJean Chalard2012-10-231-12/+21
| | | | | | | | | | | | The "correct" bigram frequency is now returned by the reading code. However, as the binary format represents the frequency in a lossy manner, the frequency is not guaranteed to be the exact same as the one in the source text format - only a close enough value. It is however the exact same value seen by the native code. Bug: 7395653 Change-Id: I49199ef18901c671189912b3550623e9643baedd
* Add @UsedForTesting and @ExternallyReferenced annotationsTadashi G. Takaoka2012-10-221-0/+2
| | | | | Bug: 7268357 Change-Id: I0b7e0c19f04af9ae30874d0a4c26ad81bc80be8c
* Add insertWord.Yuichiro Hanada2012-10-041-1/+2
| | | | | | bug: 6669677 Change-Id: Ide55a4931071de9cd42c1cddae63ddd531d2feba
* Add writeNode.Yuichiro Hanada2012-10-041-4/+17
| | | | Change-Id: I088bb6ea43ce0841d725e48b677d429e1155569d
* Add updateParentAddresses.Yuichiro Hanada2012-10-031-1/+1
| | | | Change-Id: Iac210131b7c003ef363e1138bf22f777a37c6a89
* Add isDeletedGroup.Yuichiro Hanada2012-10-031-0/+8
| | | | Change-Id: I83f09c068868e5e6e1b46f494a6ef957f0b466d8
* Add MAX_BIGRAMS_IN_A_GROUP.Yuichiro Hanada2012-10-031-1/+5
| | | | Change-Id: I128d5deb8e523045d7ad77d7a8fd3db944f71238
* Add makeCharGroupFlags.Yuichiro Hanada2012-10-031-41/+48
| | | | Change-Id: Id2c580f21b77f66a97c5fbdf4542fdafe6c43614
* Add writeCharGroup.Yuichiro Hanada2012-10-011-4/+5
| | | | | | bug: 6669677 Change-Id: I36792ba9c511a5148c963096cc93ca8c2e0ee04e
* Add updateChildrenAddress.Yuichiro Hanada2012-09-281-4/+3
| | | | Change-Id: Ic06a755d85612476e719e580469dc1cd9447286c
* Cleanup: Make some classes as finalTadashi G. Takaoka2012-09-271-2/+2
| | | | Change-Id: I6009b3c1950ba32b7f1e205a3db2307fe0cd688e
* Add moved char groups.Yuichiro Hanada2012-09-261-2/+21
| | | | | | bug: 6669677 Change-Id: I372f841044fe8e076a50a80ac10b715e5f8fd4eb
* add capacity to FusionDictionaryBufferInterface.Yuichiro Hanada2012-09-251-0/+6
| | | | | | bug: 6669677 Change-Id: I4627093811a19c46ce13fe351d1db63cbd78cf4a
* Make children addresses and parent addresses use signed addresses.Yuichiro Hanada2012-09-251-59/+153
| | | | | | | | Signed addresses are used only in version 3 with dynamic update. bug: 6669677 Change-Id: Iadaeab199b5019d2330b4573c24da74d64f0945e
* Combine mHasParentAddress with mHasLinkedListNode into mSupportsDynamicUpdate.Yuichiro Hanada2012-09-241-18/+17
| | | | | | bug: 6669677 Change-Id: I82799af199358420f09ac34fc005091e202c5d3b
* Add deleteWord.Yuichiro Hanada2012-09-211-1/+1
| | | | | | bug: 6669677 Change-Id: I1a5b90ee05e5cffd74a5c140384a3e37c79e7e70
* Add getTerminalPosition.Yuichiro Hanada2012-09-201-2/+3
| | | | Change-Id: If04d779db23b1aea2cc12e5e9b8cecfcb35a5737
* Make BinaryDictIOUtils.Yuichiro Hanada2012-09-191-102/+5
| | | | Change-Id: I45830235ee738233e8eb2bd91d659705b698f58c
* Make readNode read linked list nodes.Yuichiro Hanada2012-09-191-32/+50
| | | | Change-Id: Ia5eaae0653179b2eb74c53b0823beaf80377a389
* add limit to FusionDictionaryBufferInterface.Yuichiro Hanada2012-09-191-0/+6
| | | | Change-Id: Ic9ff717a9751023d47b02ff3b9d1fbf3115c2501
* Add a new flag for linked list nodes.Yuichiro Hanada2012-09-181-2/+4
| | | | Change-Id: Ib2f194775cfe5ab05481ac95cd709d6e8e8dd3c6
* Make writePlacedNode write the linked-list node.Yuichiro Hanada2012-09-181-4/+19
| | | | Change-Id: I60feda815ea08cf73300fccca1ae12b97550f116
* Remove populateOptions(final ByteBuffer buffer).Yuichiro Hanada2012-09-181-5/+0
| | | | Change-Id: Ifc4c64c9cffe4f343c5a604c192db010a1792acc
* Refactor BinaryDictInputOutput.Yuichiro Hanada2012-09-141-6/+0
| | | | Change-Id: Idb4b635fcac70cc988e0dd3ce3bf121fba12099c
* Move FormatOptions and FileHeader to FormatSpec.Yuichiro Hanada2012-09-131-34/+2
| | | | Change-Id: I232e35598635113bf2c81825669c744aadc79efe
* Move constants and comments.Yuichiro Hanada2012-09-131-281/+123
| | | | Change-Id: Ifd66bda7d528827ba61c60531121ea206a2325be
* Add put method to FusionDictionaryBufferInterface.Yuichiro Hanada2012-09-121-0/+6
| | | | Change-Id: Iac0b35d2da05e81237d105e8fe13c56d16038de1
* Add new binary dictionary format.Yuichiro Hanada2012-09-101-55/+202
| | | | Change-Id: Ia99411d4009857d5e420ca87ef8acf1f1826d3ed
* Check the length of the word when add to FusionDictionary.Yuichiro Hanada2012-09-101-1/+2
| | | | Change-Id: Id98d18e90a8b83b597507728b467f56888c8fd12
* Add FormatOptions.Yuichiro Hanada2012-09-051-22/+50
| | | | Change-Id: Ibad05a5f9143de1156b2c897593ec89b0a0b07e7