We send Muse EKGs to HPF via postscript. The result message contains a ZPS segment, which is just an encoded postscript document. All we do to decode the segment is:
puts $outfile [string map {
\F\ |
\S\ ^
\T\ &
\R\ ~
\E\ \
\X0A\ n
\X0D\ r
} $ekg_strip]
and save $outfile to cold as a .ps file