+ filetype = `/usr/bin/file -bz #{trace_name}`.chomp
+ gzipped = filetype =~ /gzip compressed/
+ bzipped = filetype =~ /bzip2 compressed/
+ zipped = filetype =~ /Zip archive/
+
+ if gzipped then
+ mimetype = "application/x-gzip"
+ elsif bzipped then
+ mimetype = "application/x-bzip2"
+ elsif zipped
+ mimetype = "application/x-zip"
+ else
+ mimetype = "text/xml"
+ end
+
+ return mimetype