Наследование: IFileCollectionWithFileInfos
Пример #1
0
 internal static void SkipHeader(AbstractBufferedReader reader)
 {
     FileCollectionWithFileInfos.SkipHeader(reader);
     reader.SkipUInt8();  // type of file
     reader.SkipVInt64(); // generation
     reader.SkipVInt32(); // previous file id
 }
Пример #2
0
 public void WriteHeader(AbstractBufferedWriter writer)
 {
     FileCollectionWithFileInfos.WriteHeader(writer, _guid);
     writer.WriteUInt8((byte)KVFileType.PureValuesWithId);
     writer.WriteVInt64(_subId);
     writer.WriteVInt64(_generation);
 }
Пример #3
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();
                }
            }
        }
Пример #4
0
 internal void WriteHeader(ref SpanWriter writer)
 {
     FileCollectionWithFileInfos.WriteHeader(ref writer, _guid);
     writer.WriteUInt8((byte)KVFileType.TransactionLog);
     writer.WriteVInt64(_generation);
     writer.WriteVInt32((int)_previousFileId);
 }
Пример #5
0
 internal void WriteHeader(ref SpanWriter writer)
 {
     FileCollectionWithFileInfos.WriteHeader(ref writer, _guid);
     writer.WriteUInt8((byte)KVFileType.HashKeyIndex);
     writer.WriteVInt64(_subId);
     writer.WriteVInt64(_generation);
     writer.WriteVUInt32(_keyLen);
 }
Пример #6
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
 }
Пример #7
0
 internal void WriteHeader(AbstractBufferedWriter writer)
 {
     FileCollectionWithFileInfos.WriteHeader(writer, _guid);
     writer.WriteUInt8((byte)KVFileType.ModernKeyIndex);
     writer.WriteVInt64(_generation);
     writer.WriteVUInt32(_trLogFileId);
     writer.WriteVUInt32(_trLogOffset);
     writer.WriteVUInt64((ulong)_keyValueCount);
     writer.WriteVUInt64(_commitUlong);
     writer.WriteUInt8((byte)_compressionType);
 }
Пример #8
0
        internal void WriteHeader(ref SpanWriter writer)
        {
            FileCollectionWithFileInfos.WriteHeader(ref writer, _guid);
            writer.WriteUInt8((byte)KVFileType.ModernKeyIndexWithUlongs);
            writer.WriteVInt64(_generation);
            writer.WriteVUInt32(_trLogFileId);
            writer.WriteVUInt32(_trLogOffset);
            writer.WriteVUInt64((ulong)_keyValueCount);
            writer.WriteVUInt64(_commitUlong);
            writer.WriteUInt8((byte)_compressionType);
            var ulongCount = (uint)(_ulongs?.Length ?? 0);

            writer.WriteVUInt32(ulongCount);
            if (ulongCount > 0)
            {
                for (var i = 0; i < ulongCount; i++)
                {
                    writer.WriteVUInt64(_ulongs ![i]);
Пример #9
0
        internal void WriteHeader(AbstractBufferedWriter writer)
        {
            FileCollectionWithFileInfos.WriteHeader(writer, _guid);
            writer.WriteUInt8((byte)KVFileType.ModernKeyIndexWithUlongs);
            writer.WriteVInt64(_generation);
            writer.WriteVUInt32(_trLogFileId);
            writer.WriteVUInt32(_trLogOffset);
            writer.WriteVUInt64((ulong)_keyValueCount);
            writer.WriteVUInt64(_commitUlong);
            writer.WriteUInt8((byte)_compressionType);
            var ulongCount = _ulongs != null ? (uint)_ulongs.Length : 0;

            writer.WriteVUInt32(ulongCount);
            if (ulongCount > 0)
            {
                for (var i = 0; i < ulongCount; i++)
                {
                    writer.WriteVUInt64(_ulongs[i]);
                }
            }
        }
Пример #10
0
 public void WriteHeader(ref SpanWriter writer)
 {
     FileCollectionWithFileInfos.WriteHeader(ref writer, _guid);
     writer.WriteUInt8((byte)KVFileType.PureValues);
     writer.WriteVInt64(_generation);
 }