Class HDTDictionarySectionPFC


class HDTDictionarySectionPFC extends HDTDictionarySection
HDT DictionarySection Plain Front Coding.

This part starts with a byte indicating the type of the dictionary section, followed by the VByte-encoded number of strings, the VByte-encoded buffer size and the VByte-encoded buffer length.

Then the 8-bit CRC.

Followed by an array and one or more buffers, and the 32-bit CRC calculated over the index and the buffers.

Structure:

 +------+--------------+--------------+-------+------+-------+--------+...+-------+
 | type | totalStrings | stringsBlock | array | CRC8 | index | buffer |...| CRC32 |
 +------+--------------+--------------+-------+------+-------+--------+...+-------+
 

Each buffer starts with a full string, followed by a maximum of stringsBlock - 1 pair of a VByte-encoded number of characters this string has in common with the _previous_ string, and the (different) suffix.

E.g. abcdef 2 gh 3 ij will result in abcde, abgh, abgij.

Buffer structure:

 +--------+--------+--------+...+--------+--------+
 | string | common | suffix |...| common | suffix |
 +--------+--------+--------+...+--------+--------+
 
  • Field Details

    • buffer

      private byte[] buffer
    • totalStrings

      private int totalStrings
    • stringsBlock

      private int stringsBlock
    • blockStarts

      private HDTArray blockStarts
    • cache

      private final LinkedHashMap<Integer,ArrayList<byte[]>> cache
  • Constructor Details

    • HDTDictionarySectionPFC

      protected HDTDictionarySectionPFC(String name, long pos)
      Constructor
      Parameters:
      name -
      pos -
  • Method Details