  An $F$-zip over a scheme $S$ over a finite field is a certain object of
semi-linear algebra consisting of a locally free module with a descending
filtration and an ascending filtration and a $\Frob_q$-twisted isomorphism
between the respective graded sheaves. In this article we define and
systematically investigate what might be called "$F$-zips with a
$G$-structure", for an arbitrary reductive linear algebraic group $G$.
  These objects come in two incarnations. One incarnation is an exact linear
tensor functor from the category of finite dimensional representations of $G$
to the category of $F$-zips over $S$. Locally any such functor has a type
$\chi$, which is a cocharacter of $G$. The other incarnation is a certain
$G$-torsor analogue of the notion of $F$-zips. We prove that both incarnations
define stacks that are naturally equivalent to a quotient stack of the form
$[E_{G,\chi}\backslash G_k]$ that was studied in an earlier paper. By the
results obtained there they are therefore smooth algebraic stacks of dimension
0 over $k$. Using our earlier results we can also classify the isomorphism
classes of such objects over an algebraically closed field, describe their
automorphism groups, and determine which isomorphism classes can degenerate
into which others.
  For classical groups we can deduce the corresponding results for twisted or
untwisted symplectic, orthogonal, or unitary $F$-zips. The results can be
applied to the algebraic de Rham cohomology of smooth projective varieties (or
generalizations thereof such as smooth proper Deligne-Mumford stacks) and to
truncated Barsotti-Tate groups of level 1. In addition, we hope that our
systematic group theoretical approach will help to understand the analogue of
the Ekedahl-Oort stratification of the special fibers of arbitrary Shimura
varieties.
