I actually wrote my own about 10 years ago to do this. It's really simple and only a few lines of C, but you can use any language really. You can also do this with the cpio command. See the --swap, ...