def big_endian(original_class):
    """The big_endian function is a class decorator for classes derived from
    :class:`.StructTemplate`. By default a StructTemplate class interpretes its
    fields in little endian format. Using this decorator you change this
    behavior.

    :param original_class: The class you want to turn into a big endian
                           structure."""
    orig_init = original_class.__init__

    def __init__(self, *args, **kwargs):
        orig_init(self, *args, **kwargs)
        self.endian = "big"

    original_class.__init__ = __init__
    return original_class