Esempio n. 1
0
        public static BlockHandle DecodeFrom(Slice input)
        {
            var offset = Coding.DecodeVarint64(input);
            var size   = Coding.DecodeVarint64(input);

            return(new BlockHandle(offset, size));
        }
Esempio n. 2
0
        private void ReadNewFile(Slice slice)
        {
            var level    = Coding.DecodeVarint32(slice);
            var fileNr   = Coding.DecodeVarint64(slice);
            var fileSize = Coding.DecodeVarint64(slice);
            var smallest = new Key(Coding.DecodeLengthPrefixed(slice));
            var largest  = new Key(Coding.DecodeLengthPrefixed(slice));

            m_files.Add(new TableFile(level, fileNr, fileSize, smallest, largest));
        }
Esempio n. 3
0
 private void ReadPrevLogNumber(Slice slice)
 {
     m_prevLogNumber    = Coding.DecodeVarint64(slice);
     m_hasPrevLogNumber = true;
 }
Esempio n. 4
0
 private void ReadDeletedFiled(Slice slice)
 {
     var level  = Coding.DecodeVarint32(slice);
     var fileNr = Coding.DecodeVarint64(slice);
 }
Esempio n. 5
0
 private void ReadLastSequence(Slice slice)
 {
     m_lastSequence    = Coding.DecodeVarint64(slice);
     m_hasLastSequence = true;
 }
Esempio n. 6
0
 private void ReadNextFileNumber(Slice slice)
 {
     m_nextFileNumber    = Coding.DecodeVarint64(slice);
     m_hasNextFileNumber = true;
 }
Esempio n. 7
0
 private void ReadLogNumber(Slice slice)
 {
     m_logNumber    = Coding.DecodeVarint64(slice);
     m_hasLogNumber = true;
 }