private FreebaseEntry loadEntry(DbPointer pointer)
        {
            _dbReader.BaseStream.Seek(pointer.Offset, SeekOrigin.Begin);
            _dbReader.DiscardBufferedData();
            var entryLine = _dbReader.ReadLine();

            return(DumpLoader.ParseEntry(entryLine));
        }
        private void loadIndex(string indexPath)
        {
            if (File.Exists(indexPath + "._idIndex"))
            {
                Console.WriteLine("Loading index");
                _idIndex    = deserializePointers(indexPath, "_idIndex");
                _aliasIndex = deserializePointerArrays(indexPath, "_aliasIndex", StringComparer.InvariantCultureIgnoreCase);
                Console.WriteLine("\tfinished.");
                return;
            }

            Console.WriteLine("DB index creation");
            var currentPosition = 0u;

            while (!_dbReader.EndOfStream)
            {
                var pointer    = new DbPointer(currentPosition);
                var line       = _dbReader.ReadLine();
                var lineLength = _dbReader.CurrentEncoding.GetBytes(line).Length;
                currentPosition += (uint)(lineLength + 1);

                string id;
                var    aliases = DumpLoader.ParseLabels(line, out id);
                foreach (var alias in aliases)
                {
                    if (_aliasIndex.ContainsKey(alias))
                    {
                        _aliasIndex[alias] = _aliasIndex[alias].Concat(new[] { pointer }).ToArray();
                    }
                    else
                    {
                        _aliasIndex[alias] = new[] { pointer }
                    };
                }

                _idIndex[id] = pointer;
            }
            Console.WriteLine("\tserializing");
            serialize(indexPath, "_aliasIndex", _aliasIndex);
            serialize(indexPath, "_idIndex", _idIndex);
            Console.WriteLine("\tfinished.");
        }