Snyder's-Lance has agreed to buy US cracker firm Snack Factory for US$340m from private-equity firm VMG Partners.