@classmethod
def size_bits(kls, values):
    """Return the number of bits this packet requires. """
    total = 0
    for name, typ in kls.Meta.field_types:
        if callable(typ.size_bits):
            total += typ.size_bits(values)
        else:
            total += typ.size_bits
    return total
