    private static let g15BCHDigit = bchDigit(of: g15)
    private static let g18BCHDigit = bchDigit(of: g18)

    static func bchTypeInfo(of data: Int) -> Int {
        var d = data << 10
        while bchDigit(of: d) - g15BCHDigit >= 0 {
            d ^= (g15 << (bchDigit(of: d) - g15BCHDigit))
        }
        return ((data << 10) | d) ^ g15Mask
    }