def compile(fmt, names=None):
if names is None:<EOL><INDENT>return CompiledFormat(fmt)<EOL><DEDENT>else:<EOL><INDENT>return CompiledFormatDict(fmt, names)<EOL><DEDENT>
Compile given format string `fmt` and return a compiled format
    object that can be used to pack and/or unpack data multiple times.

    Returns a :class:`~bitstruct.CompiledFormat` object if `names` is
    ``None``, and otherwise a :class:`~bitstruct.CompiledFormatDict`
    object.

    See :func:`~bitstruct.pack_dict()` for details on `names`.