Hi there. This sounds like there is inflammation within the soft palate at the back of the throat( the fleshy bit that stops food going down the windpipe). When it becomes inflamed it tends to get in the way of breathing to a degree so breathing becomes noisy- so you get a snoring/rattling type noise at the back of the throat- and yes it can sound like a pig snorting as the dog tries to clear the soft palate to breathe easily.
There are a couple of possible causes, either a foreign body stuck behind the soft palate (like a piece of grass), or an allergic response causing inflammation.
The first thing i would do (i'm presuming its still night time where you are), is to administer antihistamines in case its an allergy- so you can use either Benadryl allergy(diphenhydramine) at a dose of 1mg/lb bodyweight, or Zyrtec (cetirizine) at a dose of 0.5mg/lb. This may help if its allergy based.
If this sound continues all night, i would take him to the vet as soon as they open- they will probably want to sedate him to look behind his soft palate.
Andrea
Dog Veterinarian
bvm&s degree, 15 years in companion animal practise