Esempio n. 1
0
        /// <summary>
        /// read in the next index descriptor, and pass out the length.
        /// this assumes that the position of the filestream is at the start of an index.
        /// </summary>
        /// <param name="fs"></param>
        /// <returns></returns>
        public static RawIndex ReadNextIndexBlock(Stream fs, out int length)
        {
            // read in the length of the index data
            length = readNextIndexDataLength(fs);

            // read in the block of index data:
            byte[] idxBlock = ReadBuffer(fs, length);

            // deserialize it:
            return(RawIndex.FromByteArray(idxBlock));
        }