diff options
author | 2013-08-09 04:30:24 -0700 | |
---|---|---|
committer | 2013-08-09 04:30:24 -0700 | |
commit | 5d7b46343bb12b0d311f07c5e0dda4d5bcd3b8bd (patch) | |
tree | 4cc1bd4f7b3c96e1fec93b8e8fa1d2231ab9315d /java/src/com/android/inputmethod/latin/makedict/FormatSpec.java | |
parent | ba272d9e4b5528f4de0a521e34e98c086a6c49b9 (diff) | |
parent | 7ec9db2c34ee6bec2cbff6cf05cee9bf3c2f7122 (diff) | |
download | latinime-5d7b46343bb12b0d311f07c5e0dda4d5bcd3b8bd.tar.gz latinime-5d7b46343bb12b0d311f07c5e0dda4d5bcd3b8bd.tar.xz latinime-5d7b46343bb12b0d311f07c5e0dda4d5bcd3b8bd.zip |
am 7ec9db2c: Remove the code and comments about version 1 format.
* commit '7ec9db2c34ee6bec2cbff6cf05cee9bf3c2f7122':
Remove the code and comments about version 1 format.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/FormatSpec.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/makedict/FormatSpec.java | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java index 46266aa50..2bb5d8b6e 100644 --- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java +++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java @@ -26,6 +26,40 @@ import com.android.inputmethod.latin.makedict.FusionDictionary.DictionaryOptions public final class FormatSpec { /* + * File header layout is as follows: + * + * v | + * e | MAGIC_NUMBER + version of the file format, 2 bytes. + * r | + * sion + * + * o | + * p | not used 4 bits + * t | has bigrams ? 1 bit, 1 = yes, 0 = no : CONTAINS_BIGRAMS_FLAG + * i | FRENCH_LIGATURE_PROCESSING_FLAG + * o | supports dynamic updates ? 1 bit, 1 = yes, 0 = no : SUPPORTS_DYNAMIC_UPDATE + * n | GERMAN_UMLAUT_PROCESSING_FLAG + * f | + * lags + * + * h | + * e | size of the file header, 4bytes + * a | including the size of the magic number, the option flags and the header size + * d | + * ersize + * + * | attributes list + * + * attributes list is: + * <key> = | string of characters at the char format described below, with the terminator used + * | to signal the end of the string. + * <value> = | string of characters at the char format described below, with the terminator used + * | to signal the end of the string. + * if the size of already read < headersize, goto key. + * + */ + + /* * Array of Node(FusionDictionary.Node) layout is as follows: * * g | @@ -151,12 +185,10 @@ public final class FormatSpec { * if (FLAG_ATTRIBUTE_HAS_NEXT goto flags */ - static final int VERSION_1_MAGIC_NUMBER = 0x78B1; - public static final int VERSION_2_MAGIC_NUMBER = 0x9BC13AFE; - static final int MINIMUM_SUPPORTED_VERSION = 1; + public static final int MAGIC_NUMBER = 0x9BC13AFE; + static final int MINIMUM_SUPPORTED_VERSION = 2; static final int MAXIMUM_SUPPORTED_VERSION = 3; static final int NOT_A_VERSION_NUMBER = -1; - static final int FIRST_VERSION_WITH_HEADER_SIZE = 2; static final int FIRST_VERSION_WITH_DYNAMIC_UPDATE = 3; // These options need to be the same numeric values as the one in the native reading code. |