NoCompress#

class astropy.io.fits.hdu.compressed._codecs.NoCompress[source]#

Bases: Codec

A dummy compression/decompression algorithm that stores the data as-is.

While the data is not compressed/decompressed, it is converted to big endian during encoding as this is what is expected in FITS files.

Attributes Summary

codec_id

Methods Summary

decode(buf)

Decompress buffer using the NOCOMPRESS algorithm.

encode(buf)

Compress the data in the buffer using the NOCOMPRESS algorithm.

Attributes Documentation

codec_id = 'FITS_NOCOMPRESS'#

Methods Documentation

decode(buf)[source]#

Decompress buffer using the NOCOMPRESS algorithm.

Parameters:
bufbytes or array_like

The buffer to decompress.

Returns:
bufnp.ndarray

The decompressed buffer.

encode(buf)[source]#

Compress the data in the buffer using the NOCOMPRESS algorithm.

Parameters:
bufbytes or array_like

The buffer to compress.

Returns:
bytes

The compressed bytes.