handles

open fun handles(source: File, options: Options): Boolean

Returns true if this decoder is capable of decoding the given source with the given options, and false otherwise.

Decoders should make a best effort attempt to quickly determine if they are likely to be able to decode data, but should not attempt to completely read the given data. A typical implementation would check the file headers verify they match content the decoder expects to handle (i.e. a GIF decoder should verify that the image contains the GIF header block.

Decoders that return true from handles may still return null from decode if the data is partial or formatted incorrectly.