Add decode.rb for Sara's encoder