Detect use of lossy compression in RAF

Is there a way to tell if a Fuji RAF file is using lossy compression? (Such as from the GFX-100 or X-T4.)

I get LIBRAW_IO_ERROR returned from unpack(), but I don't want to rely on that -- it could mean other things besides lossy compression. Ideally I'd like to check something in libraw_data_t that says what kind of compression it is, or even just a more general "not supported" indication.

Forums: 

There is no direct/accurate

There is no direct/accurate way in LibRaw 0.20

If you're ready to subclass LibRaw to own class to access protected fields (libraw_internal_data.unpacker_data) , use this method:

position to libraw_internal_data.unpacker_data.data_offset and read header (16 bytes), data version in 3rd byte of header (header[2]), it is 1 for lossless compression (supported) and 0 for unsupported lossy.

-- Alex Tutubalin @LibRaw LLC