Esempio n. 1
0
            //public static void Write(Stream stream, SpecialPostingBlockEntry entry)
            //{
            //    TermLink.Write(stream, entry.FirstPosting ?? new TermLink());
            //    stream.WriteInt64Network(entry.Offset);
            //}

            public static int Write(byte[] buffer, SpecialPostingBlockEntry entry, int offset)
            {
                var size = TermLink.Write(buffer, entry.FirstPosting, offset);

                offset += size;
                buffer.WriteInt64Network(entry.Offset, offset);
                size += 8;
                return(size);
            }
Esempio n. 2
0
        /// <summary>
        /// ibatrak Запись данных обыкновенного формата
        /// </summary>
        private static int Write(byte[] buffer, IfpRecord ifpRecord, int offset)
        {
            var size = WriteLeader(buffer, ifpRecord, offset);

            offset += size;

            for (int i = 0; i < ifpRecord.Links.Count; i++)
            {
                var linkSize = TermLink.Write(buffer, ifpRecord.Links[i], offset);
                offset += linkSize;
                size   += linkSize;
            }
            return(size);
        }