PLIO1#
- class astropy.io.fits.hdu.compressed._codecs.PLIO1(*, tilesize: int)[source]#
Bases:
Codec
The FITS PLIO1 compression and decompression algorithm.
The IRAF PLIO (pixel list) algorithm was developed to store integer-valued image masks in a compressed form. Such masks often have large regions of constant value hence are highly compressible. The compression algorithm used is based on run-length encoding, with the ability to dynamically follow level changes in the image, allowing a 16-bit encoding to be used regardless of the image depth.
Attributes Summary
Methods Summary
decode
(buf)Decompress buffer using the PLIO_1 algorithm.
encode
(buf)Compress the data in the buffer using the PLIO_1 algorithm.
Attributes Documentation
- codec_id = 'FITS_PLIO1'#
Methods Documentation
- decode(buf)[source]#
Decompress buffer using the PLIO_1 algorithm.
- Parameters:
- buf
bytes
or array_like The buffer to decompress.
- buf
- Returns:
- buf
np.ndarray
The decompressed buffer.
- buf
- encode(buf)[source]#
Compress the data in the buffer using the PLIO_1 algorithm.
- Parameters:
- buf
bytes
or array_like The buffer to compress.
- buf
- Returns:
bytes
The compressed bytes.