1. A coding method for compressing a power spectrum of an optoelectronic component, the method comprising: providing at least one power spectrum of the optoelectronic component; sampling the power spectrum at particular sampling wavelengths in order to produce a discrete source spectrum; indexing the discrete source spectrum in order to produce a source graph having discrete source values, the wavelengths being replaced by continuous source indices; producing an image graph having discrete image values by transforming the source graph from a source range into an image range with a discrete frequency transform; performing compression of the image graph, relevant and low-relevance components of the image graph being identified and the low-relevance components being eliminated from the image graph; and digitizing the compressed image graph in order to produce compressed spectral data, each image value of the compressed image graph being assigned a corresponding digital number having a determined bit depth.