research/brotlidump.py
def splitSymbol(self, index):
        """Give relevant values for computations:
        (insertSymbol, copySymbol, dist0flag)
        """
        #determine insert and copy upper bits from table
        row = [0,0,1,1,2,2,1,3,2,3,3][index>>6]
        col = [0,1,0,1,0,1,2,0,2,1,2][index>>6]
        #determine inserts and copy sub codes
        insertLengthCode = row<<3 | index>>3&7
        if row: insertLengthCode -= 8
        copyLengthCode = col<<3 | index&7
        return (
            Symbol(self.insertLengthAlphabet, insertLengthCode),
            Symbol(self.copyLengthAlphabet, copyLengthCode),
            row==0
            )
def splitSymbol(self, index):
        """Give relevant values for computations:
        (insertSymbol, copySymbol, dist0flag)
        """
        #determine insert and copy upper bits from table
        row = [0,0,1,1,2,2,1,3,2,3,3][index>>6]
        col = [0,1,0,1,0,1,2,0,2,1,2][index>>6]
        #determine inserts and copy sub codes
        insertLengthCode = row<<3 | index>>3&7
        if row: insertLengthCode -= 8
        copyLengthCode = col<<3 | index&7
        return (
            Symbol(self.insertLengthAlphabet, insertLengthCode),
            Symbol(self.copyLengthAlphabet, copyLengthCode),
            row==0
            )
def splitSymbol ( self , index ) : #determine insert and copy upper bits from table row = [ 0 , 0 , 1 , 1 , 2 , 2 , 1 , 3 , 2 , 3 , 3 ] [ index >> 6 ] col = [ 0 , 1 , 0 , 1 , 0 , 1 , 2 , 0 , 2 , 1 , 2 ] [ index >> 6 ] #determine inserts and copy sub codes insertLengthCode = row << 3 | index >> 3 & 7 if row : insertLengthCode -= 8 copyLengthCode = col << 3 | index & 7 return ( Symbol ( self . insertLengthAlphabet , insertLengthCode ) , Symbol ( self . copyLengthAlphabet , copyLengthCode ) , row == 0 )
Give relevant values for computations:
        (insertSymbol, copySymbol, dist0flag)
Give relevant values for computations : ( insertSymbol copySymbol dist0flag )