research/brotlidump.py
def readPrefixArray(self, kind, numberOfTrees):
        """Read prefix code array"""
        prefixes = []
        for i in range(numberOfTrees):
            if kind==L: alphabet = LiteralAlphabet(i)
            elif kind==I: alphabet = InsertAndCopyAlphabet(i)
            elif kind==D: alphabet = DistanceAlphabet(
                i, NPOSTFIX=self.NPOSTFIX, NDIRECT=self.NDIRECT)
            self.readPrefixCode(alphabet)
            prefixes.append(alphabet)
        self.prefixCodes[kind] = prefixes
def readPrefixArray(self, kind, numberOfTrees):
        prefixes = []
        for i in range(numberOfTrees):
            if kind==L: alphabet = LiteralAlphabet(i)
            elif kind==I: alphabet = InsertAndCopyAlphabet(i)
            elif kind==D: alphabet = DistanceAlphabet(
                i, NPOSTFIX=self.NPOSTFIX, NDIRECT=self.NDIRECT)
            self.readPrefixCode(alphabet)
            prefixes.append(alphabet)
        self.prefixCodes[kind] = prefixes
def readPrefixArray ( self , kind , numberOfTrees ) : prefixes = [ ] for i in range ( numberOfTrees ) : if kind == L : alphabet = LiteralAlphabet ( i ) elif kind == I : alphabet = InsertAndCopyAlphabet ( i ) elif kind == D : alphabet = DistanceAlphabet ( i , NPOSTFIX = self . NPOSTFIX , NDIRECT = self . NDIRECT ) self . readPrefixCode ( alphabet ) prefixes . append ( alphabet ) self . prefixCodes [ kind ] = prefixes
Read prefix code array
Read prefix code array