Blame view

morfeusz/decoder/InterpretedChunksDecoder.cpp 661 Bytes
MichaƂ Lenart authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

#include "InterpretedChunksDecoder.hpp"

const unsigned char* InterpretedChunksDecoder::getInterpretationsPtr(const unsigned char* igPtr) const {
    if (env.getProcessorType() == ANALYZER) {
        if (hasCompressedOrthCasePatterns(*igPtr)) {
            return igPtr + 1;
        }
        else {
            const unsigned char* currPtr = igPtr + 1;
            unsigned char casePatternsNum = readInt8(currPtr);
            for (unsigned int i = 0; i < casePatternsNum; i++) {
                env.getCasePatternHelper().deserializeOneCasePattern(currPtr);
            }
            return currPtr;
        }
    }
    else {
        return igPtr;
    }
}