SkipHeader() static private method

static private SkipHeader ( AbstractBufferedReader reader ) : void
reader AbstractBufferedReader
return void
Example #1
0
        internal static void SkipHeader(AbstractBufferedReader reader)
        {
            FileCollectionWithFileInfos.SkipHeader(reader);
            var type            = (KVFileType)reader.ReadUInt8();
            var withCommitUlong = type == KVFileType.KeyIndexWithCommitUlong || type == KVFileType.ModernKeyIndex || type == KVFileType.ModernKeyIndexWithUlongs;

            reader.SkipVInt64();  // generation
            reader.SkipVUInt32(); // trLogFileId
            reader.SkipVUInt32(); // trLogOffset
            reader.SkipVUInt64(); // keyValueCount
            if (withCommitUlong)
            {
                reader.SkipVUInt64();                  // commitUlong
            }
            if (type == KVFileType.ModernKeyIndex || type == KVFileType.ModernKeyIndexWithUlongs)
            {
                reader.SkipUInt8();
            }
            if (type == KVFileType.ModernKeyIndexWithUlongs)
            {
                var ulongCount = reader.ReadVUInt32();
                while (ulongCount-- > 0)
                {
                    reader.SkipVUInt64();
                }
            }
        }
Example #2
0
 internal static void SkipHeader(AbstractBufferedReader reader)
 {
     FileCollectionWithFileInfos.SkipHeader(reader);
     reader.SkipUInt8();  // type of file
     reader.SkipVInt64(); // generation
     reader.SkipVInt32(); // previous file id
 }
Example #3
0
 internal static void SkipHeader(ref SpanReader reader)
 {
     FileCollectionWithFileInfos.SkipHeader(ref reader);
     reader.SkipUInt8();   // type of file
     reader.SkipVInt64();  // subId
     reader.SkipVInt64();  // generation
     reader.SkipVUInt32(); // keyLen
 }