If there was enough moisture inside to eat away the top of the compression post and the fitting there, then the odds are the bottom has also been damaged. You need to excavate down and find out.
Typically you would slack the
rigging off, then use a screw jack or lolly column to raise the cabin top and take the load while you remove the compression post, allowing the mast to stay in place. Or, lower the mast and then remove the post.
A new post is a "simple" matter of choosing a suitably strong piece of pipe or lumber and then fabricating new ends plates as needed. sometimes people have those welded up from aluminum alloy, sometimes UDHPE, again it is a matter of what is convenient for you, and strong. Extra points if it also looks good.