aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
diff options
context:
space:
mode:
authorYuichiro Hanada <yhanada@google.com>2013-08-08 14:16:50 +0900
committerYuichiro Hanada <yhanada@google.com>2013-08-09 16:05:07 +0900
commit7ec9db2c34ee6bec2cbff6cf05cee9bf3c2f7122 (patch)
treebabf61f77d189fad939c6643594f00f5951254fe /java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
parent4571b0f682430d27785ff2e55f1376b4c8309104 (diff)
downloadlatinime-7ec9db2c34ee6bec2cbff6cf05cee9bf3c2f7122.tar.gz
latinime-7ec9db2c34ee6bec2cbff6cf05cee9bf3c2f7122.tar.xz
latinime-7ec9db2c34ee6bec2cbff6cf05cee9bf3c2f7122.zip
Remove the code and comments about version 1 format.
Change-Id: I827052f234eeaa4dbcfd37da69a99866896a158b
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/FormatSpec.java')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/FormatSpec.java40
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.