Add bad blocks to HFS+ badblock list

I have a list of bad blocks (fsck_hfs -S), and I want to add it to the badblock section of hfs+ filesystem. I do not know how to write a program to do that, so is there an existing program to do it?