box compression formula