Added initial support for the Q format type. This turned out to be easy to at least get started with by simply subclassing the _FormatP type.  I also tested basic functionality by parametrizing the existing VLA tests to run with both format P and format Q. Though this does not actually test use of format Q for files exceeding 2 GB.  It also does not test it in the context of tile compression (but the vendored CFITSIO will have to be upgraded to support that).

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2255 ed100bfc-0583-0410-97f2-c26b58777a21
Merge branch 'fits/compressionmodule-intsize'

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2256 ed100bfc-0583-0410-97f2-c26b58777a21
Moved truncation of over-allocated table+heap arrays to the C code.

I'm not sure why I ever expected the existing code to work as written:
creating an array using PyArray_SimpleNewFromData never gives the array
ownership of the data, which mean that writing compressed data always
required making a copy with `np.resize()` it seems like.

Another implication of this is that the created Numpy array doesn't
own the data (as in, the memory for the data was not allocated by
Numpy itself), then when the Numpy array is dereferenced it never
frees the data.  So I think there might be a memory leak when writing
compressed data, but I need to test this.  It's possible such a memory
leak has already been reported but I still need to check on that too.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2257 ed100bfc-0583-0410-97f2-c26b58777a21
Handle freeing the columns array correctly. The columns pointer in the compress/decompress_hdu functions was never being pointed to the allocated array and was thus always NULL. But we also need to make sure to use PyMem_Free on before calling fits_close_file(), as it was allocated with PyMem_New (then set it to NULL so that fits_close_file() doesn't try to double-free it).

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2258 ed100bfc-0583-0410-97f2-c26b58777a21
Added new .dtype attributes on the Column and ColDefs class to make it easier to get the dtype associated with a column or set of columns; reduced a little bit of code duplication.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2259 ed100bfc-0583-0410-97f2-c26b58777a21
Adds support for writing compressed images using the Q format for compressed data columns where appropriate.  As the comments in the code say, the heuristic used to determined whether the Q format should be used is imperfect, but it is the same heuristic used by CFITSIO so at least it's consistent.

This also fixes a long-standing bug where it was assumed that each column in a compressed image BINTABLE is 8 bytes wide.  In fairness, that was previously a reasonable assumption (most of the columns were either type P or D), but the standard does permit other columns in the table besides the ones explicitly defined by the standard.  And now of course with support for the Q type columns can be 16 bytes wide as well.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2260 ed100bfc-0583-0410-97f2-c26b58777a21
Added changelog entries related to #159 and #160 (removed the somewhat superflous 'New Features' section)

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2261 ed100bfc-0583-0410-97f2-c26b58777a21
Don't allow compression of large images to be attempted without CFITSIO 3.35.  This is the version included with PyFITS, but it's possible PyFITS was linked against an older system version of CFITSIO (at least 3.28 and up is supported for now).

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2262 ed100bfc-0583-0410-97f2-c26b58777a21
Fix unhandled exception when getting the HDU data fails (typically in the case of the file being truncated; see https://github.com/astropy/astropy/issues/541)

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2265 ed100bfc-0583-0410-97f2-c26b58777a21