Home
last modified time | relevance | path

Searched refs:headerBuffer (Results 1 – 9 of 9) sorted by relevance

/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/
DBinaryDictEncoderUtils.java761 ByteArrayOutputStream headerBuffer = new ByteArrayOutputStream(256); in writeDictionaryHeader() local
765 headerBuffer.write((byte) (0xFF & (FormatSpec.MAGIC_NUMBER >> 24))); in writeDictionaryHeader()
766 headerBuffer.write((byte) (0xFF & (FormatSpec.MAGIC_NUMBER >> 16))); in writeDictionaryHeader()
767 headerBuffer.write((byte) (0xFF & (FormatSpec.MAGIC_NUMBER >> 8))); in writeDictionaryHeader()
768 headerBuffer.write((byte) (0xFF & FormatSpec.MAGIC_NUMBER)); in writeDictionaryHeader()
770 headerBuffer.write((byte) (0xFF & (version >> 8))); in writeDictionaryHeader()
771 headerBuffer.write((byte) (0xFF & version)); in writeDictionaryHeader()
776 headerBuffer.write((byte) (0xFF & (options >> 8))); in writeDictionaryHeader()
777 headerBuffer.write((byte) (0xFF & options)); in writeDictionaryHeader()
778 final int headerSizeOffset = headerBuffer.size(); in writeDictionaryHeader()
[all …]
DBinaryDictDecoderUtils.java375 public static HashMap<String, String> decodeHeaderAttributes(@Nonnull final byte[] headerBuffer) in decodeHeaderAttributes() argument
380 while (index < headerBuffer.length) { in decodeHeaderAttributes()
381 if (headerBuffer[index] == FormatSpec.PTNODE_CHARACTERS_TERMINATOR) { in decodeHeaderAttributes()
384 } else if (CharEncoding.fitsOnOneByte(headerBuffer[index] & 0xFF, in decodeHeaderAttributes()
386 sb.appendCodePoint(headerBuffer[index] & 0xFF); in decodeHeaderAttributes()
388 sb.appendCodePoint(((headerBuffer[index] & 0xFF) << 16) in decodeHeaderAttributes()
389 + ((headerBuffer[index + 1] & 0xFF) << 8) in decodeHeaderAttributes()
390 + (headerBuffer[index + 2] & 0xFF)); in decodeHeaderAttributes()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/
Dver4_dict_buffers.cpp40 const char *const dictPath, MmappedBuffer::MmappedBufferPtr headerBuffer, in openVer4DictBuffers() argument
42 if (!headerBuffer) { in openVer4DictBuffers()
48 const bool isUpdatable = headerBuffer->isUpdatable(); in openVer4DictBuffers()
49 return Ver4DictBuffersPtr(new Ver4DictBuffers(dictPath, std::move(headerBuffer), isUpdatable, in openVer4DictBuffers()
54 const BufferWithExtendableBuffer *const headerBuffer) const { in flushHeaderAndDictBuffers()
84 Ver4DictConstants::HEADER_FILE_EXTENSION, headerBuffer)) { in flushHeaderAndDictBuffers()
129 MmappedBuffer::MmappedBufferPtr headerBuffer, const bool isUpdatable, in Ver4DictBuffers() argument
131 : mHeaderBuffer(std::move(headerBuffer)), in Ver4DictBuffers()
Dver4_patricia_trie_writing_helper.cpp48 BufferWithExtendableBuffer headerBuffer( in writeToDictFile() local
53 entryCounts, extendedRegionSize, &headerBuffer)) { in writeToDictFile()
60 return mBuffers->flushHeaderAndDictBuffers(dictDirPath, &headerBuffer); in writeToDictFile()
74 BufferWithExtendableBuffer headerBuffer( in writeToDictFileWithGC() local
80 entryCounters.getEntryCounts(), 0 /* extendedRegionSize */, &headerBuffer)) { in writeToDictFileWithGC()
83 return dictBuffers->flushHeaderAndDictBuffers(dictDirPath, &headerBuffer); in writeToDictFileWithGC()
Dver4_dict_buffers.h48 MmappedBuffer::MmappedBufferPtr headerBuffer,
127 const BufferWithExtendableBuffer *const headerBuffer) const;
133 const MmappedBuffer::MmappedBufferPtr headerBuffer, const bool isUpdatable,
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/
Dver4_dict_buffers.cpp34 const char *const dictPath, MmappedBuffer::MmappedBufferPtr &&headerBuffer, in openVer4DictBuffers() argument
36 if (!headerBuffer) { in openVer4DictBuffers()
42 const bool isUpdatable = headerBuffer->isUpdatable(); in openVer4DictBuffers()
65 return Ver4DictBuffersPtr(new Ver4DictBuffers(std::move(headerBuffer), std::move(bodyBuffer), in openVer4DictBuffers()
70 const BufferWithExtendableBuffer *const headerBuffer) const { in flushHeaderAndDictBuffers()
100 Ver4DictConstants::HEADER_FILE_EXTENSION, headerBuffer)) { in flushHeaderAndDictBuffers()
170 Ver4DictBuffers::Ver4DictBuffers(MmappedBuffer::MmappedBufferPtr &&headerBuffer, in Ver4DictBuffers() argument
174 : mHeaderBuffer(std::move(headerBuffer)), mDictBuffer(std::move(bodyBuffer)), in Ver4DictBuffers()
Dver4_patricia_trie_writing_helper.cpp39 BufferWithExtendableBuffer headerBuffer( in writeToDictFile() local
44 entryCounts, extendedRegionSize, &headerBuffer)) { in writeToDictFile()
53 return mBuffers->flushHeaderAndDictBuffers(dictDirPath, &headerBuffer); in writeToDictFile()
66 BufferWithExtendableBuffer headerBuffer( in writeToDictFileWithGC() local
69 entryCounters.getEntryCounts(), 0 /* extendedRegionSize */, &headerBuffer)) { in writeToDictFileWithGC()
72 return dictBuffers->flushHeaderAndDictBuffers(dictDirPath, &headerBuffer); in writeToDictFileWithGC()
Dver4_dict_buffers.h39 MmappedBuffer::MmappedBufferPtr &&headerBuffer,
107 const BufferWithExtendableBuffer *const headerBuffer) const;
112 Ver4DictBuffers(MmappedBuffer::MmappedBufferPtr &&headerBuffer,
/packages/inputmethods/LatinIME/tools/dicttool/src/com/android/inputmethod/latin/dicttool/
DBinaryDictOffdeviceUtils.java186 final byte[] headerBuffer = new byte[totalHeaderSize - tmpBuffer.length]; in process()
187 readStreamExhaustively(input, headerBuffer); in process()
189 BinaryDictDecoderUtils.decodeHeaderAttributes(headerBuffer); in process()