am b50a7a4b: Simplify computeActualNodeArraySize.
* commit 'b50a7a4bc718f3611ac1e97a940d5a59b4b0133e': Simplify computeActualNodeArraySize.main
commit
5ab2ab12d4
|
@ -326,15 +326,11 @@ public class BinaryDictEncoderUtils {
|
||||||
}
|
}
|
||||||
int nodeSize = getNodeHeaderSize(ptNode, formatOptions);
|
int nodeSize = getNodeHeaderSize(ptNode, formatOptions);
|
||||||
if (ptNode.isTerminal()) nodeSize += FormatSpec.PTNODE_FREQUENCY_SIZE;
|
if (ptNode.isTerminal()) nodeSize += FormatSpec.PTNODE_FREQUENCY_SIZE;
|
||||||
if (null == ptNode.mChildren && formatOptions.mSupportsDynamicUpdate) {
|
if (formatOptions.mSupportsDynamicUpdate) {
|
||||||
nodeSize += FormatSpec.SIGNED_CHILDREN_ADDRESS_SIZE;
|
nodeSize += FormatSpec.SIGNED_CHILDREN_ADDRESS_SIZE;
|
||||||
} else if (null != ptNode.mChildren) {
|
} else if (null != ptNode.mChildren) {
|
||||||
if (formatOptions.mSupportsDynamicUpdate) {
|
nodeSize += getByteSize(getOffsetToTargetNodeArrayDuringUpdate(ptNodeArray,
|
||||||
nodeSize += FormatSpec.SIGNED_CHILDREN_ADDRESS_SIZE;
|
nodeSize + size, ptNode.mChildren));
|
||||||
} else {
|
|
||||||
nodeSize += getByteSize(getOffsetToTargetNodeArrayDuringUpdate(ptNodeArray,
|
|
||||||
nodeSize + size, ptNode.mChildren));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
nodeSize += getShortcutListSize(ptNode.mShortcutTargets);
|
nodeSize += getShortcutListSize(ptNode.mShortcutTargets);
|
||||||
if (null != ptNode.mBigrams) {
|
if (null != ptNode.mBigrams) {
|
||||||
|
|
Loading…
Reference in New Issue