A compression test has nothing to do with a knock. A compression test checks the seal of the piston to the cyl , head gasket and valves. There are many things in an engine that can cause a knock unforgettably most are expensive and will require the engine to be removed and disassembled. Is this boat at a dealer? Will they give you a written warranty concerning the knock? Will they allow an independent surveyor to check it for you? A knock can be a nothing to worry about or a major problem if you have to replace the engine you will spend as much as 10,000 dollars. Make sure you know what is causing it before you buy. Where is the boat?