[fitsbits] FITS Mime Type for gzipped bintable

Joe Hourcle oneiros at grace.nascom.nasa.gov
Tue Jun 11 12:24:20 EDT 2013


On Jun 11, 2013, at 10:20 AM, Lucio Chiappetti wrote:

> On Tue, 11 Jun 2013, Steve Allen wrote:
> 
>> On Tue 2013-06-11T09:36:04 -0400, Arnold Rots hath writ:
> 
>>> For image and tar there are such options but not for bintable
>>> image/x-fits-gzip                   A GZIP-compressed FITS image
>>> application/x-tar-gzip            A GZIP-compressed TAR file
> 
>> RFC 4047 defines none of these, and with the IANA everything
>> starting with "x-" is not actually registered as a media type.
> 
> In fact *OUR* RCF4047 defines only image/fits and application/fits.
> And has one or more notes saying
> 
> Encoding considerations: binary
> 
>    FITS files can be quite large.  When transferred via HTTP it may be
>    efficient for the transaction to make use of content-coding or
>    transfer-coding values such as "gzip", "compress", or "deflate".
> 
> Therefore "image/x-fits-gzip" is not one of MIME types we defined. Being 
> it an "x-" I suspect it is a "private extension", which is legitimate but 
> "use at one's own risk". And apparently seems misleading with respect to 
> RFC4047.
> 
> (but I'm not a MIME guru ...)

'Content coding' refers to the whole file being compressed in some
manner : 
	http://tools.ietf.org/html/rfc2616#section-3.5

So someone might ask for 'file.fits' and you send the whole thing
gzip'd with a note via the 'Content-Encoding' HTTP header that it
needs to be ungzip'd

As for the mime type -- it's just 'application/fits'.  Yes, there
are different possible encodings of FITS files, but likewise there's
more than one compression scheme allowed for JPEGs (DCT, progressive
DCT), and they're all just 'image/jpeg'.  

Or we could compare it to another wrapper like PDF, where you could
have any number of differently packaged objects in it, but there's
only a single registered mime type:

	http://www.rfc-editor.org/rfc/rfc3778.txt

( note -- there are unregistered PDF mime-types, but I'm only aware
of one being registered; for others see:
	 http://www.digitalpreservation.gov/formats/fdd/fdd000030.shtml
)

-----
Joe Hourcle
Programmer/Analyst
Solar Data Analysis Center
Goddard Space Flight Center




More information about the fitsbits mailing list