def compress_column(col):
    """takes a dense matrix column and puts it into OP4 format"""
    packs = []
    n = 0
    i = 0
    packi = []
    while i < len(col):
        if col[i] == n + 1:
            packi.append(i)
            n += 1
        else:
            if packi:
                packs.append(packi)
            packi = [i]
            n = col[i]
        i += 1
    if packi:
        packs.append(packi)
    return packs
