<div dir="ltr">In reference to the cfitsio Rice algorithm, that algorithm sets defaults for: (1) the number of remainder bits for Int8, Int16, and Int32 of 3, 4, and 5, resp.; and (2) the maximum number of remainder bits of 6, 14, and 25, resp.. Because that algorithm does not have an Int64 version, there are no such defaults.<div><br></div><div>It would be nice to know what those defaults are for anyone that wants to implement an Int64 version of the algorithm. I for one would like to know as I am currently implementing a Julia version of the algorithm for the FITSFiles.jl package and want to make it fully compliant with version 4 of the specification.</div><div><br></div><div>Any help in this matter would be greatly appreciated.</div><div><br></div><div> -- Paul</div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Aug 14, 2025 at 12:59 PM Barrett, Paul via fitsbits <<a href="mailto:fitsbits@listmgr.nrao.edu">fitsbits@listmgr.nrao.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Is anyone aware of a description of the Rice compression algorithm that is used by FITS?<div><br></div><div><div>The only pseudo-description that I can find is the ricecomp.c code in the cfitsio repository. It would be nice to have a language agnostic description. Note that it is a non-standard algorithm, because it divides the data into subarrays and performs some preprocessing of the subarrays before compressing the data. The standard Rice compression algorithm does not perform preprocessing.<div><br></div><div>I should also note that cfitsio does not have an algorithm for Int64 types; only Int8, Int16, and Int32. The FITS specification permits all four integer types. I guess no one does Int64 compression.</div><div><br></div><div> -- Paul</div><div><br></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Paul Barrett, PhD<div>Department of Physics</div><div>The George Washington University</div><div>Washington, DC 20052</div><div><br></div></div></div></div></div></div>
_______________________________________________<br>
fitsbits mailing list<br>
<a href="mailto:fitsbits@listmgr.nrao.edu" target="_blank">fitsbits@listmgr.nrao.edu</a><br>
<a href="https://listmgr.nrao.edu/mailman/listinfo/fitsbits" rel="noreferrer" target="_blank">https://listmgr.nrao.edu/mailman/listinfo/fitsbits</a><br>
</blockquote></div>