Skip to main content
`Ctrl`+`K`

# NoCompress

class astropy.io.fits.hdu.compressed._codecs.NoCompress

  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)

    Decompress buffer using the NOCOMPRESS algorithm.

    Parameters:
      buf `bytes` or numpy:array_like

        The buffer to decompress.

    Returns:
      buf `np.ndarray`

        The decompressed buffer.

  encode(buf)

    Compress the data in the buffer using the NOCOMPRESS algorithm.

    Parameters:
      buf `bytes` or numpy:array_like

        The buffer to compress.

    Returns:
      `bytes`

        The compressed bytes.