Knocking is a very generic description. If you could locate it to a general area it would help. Some things that can cause a knocking:

1) Rod bearing loose or worn.
2) Main bearing worn or spinning.
3) Piston slap from loose clearance.
4) Lifter gone flat from low oil pressure or gunk in the system.
5) Loose coupling for the prop...loose prop...although it won't be loose for long!
6) Flex plate springs broken or missing.
7) Tranny or V-drive issue.

Those are just some things quickly off the top of my head. A compression check will not diagnose any of them. All of them require at least some disassembly to diagnose. If I hear noises like a real knocking, I would walk away. Since it is a dealer, and if it is a really good deal otherwise...get them to warranty the engine bottom end and drive train for a year. If you use the boat hard next summer, any real knocking will grow to a full scale break down by then!

Remember, prices will continue to drop on boats at least through February, as families try to cover Christmas expenses. There is no reason to hurry into a deal unless you are confident about it.