def compress(traj, copy=True, **kwds):
    """Wrapper for :meth:`Trajectory.compress`.

    Parameters
    ----------
    copy : bool
        Return compressed copy or in-place modified object.
    **kwds : keywords
        keywords to :meth:`Trajectory.compress`

    Examples
    --------
    >>> trc = compress(tr, copy=True, forget=['coords'])
    >>> trc.dump('very_small_file.pk')
    """
    if copy:
        out = traj.copy()
    else:
        out = traj
    out.compress(**kwds)
    return out