From: rsbecker@nexbridge.com Date: Mon, 25 Jul 2022 22:35:30 GMT Subject: RE: Can I use CRoaring library in Git? Message-ID: <028201d8a076$dbb5a7d0$9320f770$@nexbridge.com> In-Reply-To: On July 25, 2022 6:15 PM, Taylor Blau wrote: >On Mon, Jul 18, 2022 at 08:18:14AM -0400, Derrick Stolee wrote: >> On 7/18/22 7:48 AM, Abhradeep Chakraborty wrote: >> > I just got to know that CRoaring doesn't support Big Endian systems >> > (till now) - >> > >> > https://groups.google.com/g/roaring-bitmaps/c/CzLmIRnYlps >> > >> > What do you think about this? >> >> Git cares enough about compatibility that that might be a deal-breaker >> for taking the code as-is. If we _did_ take it as-is, then we would >> need to not make it available on such machines using compiler macros. > >I definitely agree here. If I'm understanding CRoaring's implementation correctly, a >bitmap written on a machine that uses big endian would be unreadable on a little >endian machine and vice-versa. > >That's definitely *not* the case with the existing EWAH bitmaps, which are >readable on machines using either endianness, since we always write numbers in >network byte order, independent of machine endinaness. > >(I suspect you know all of this already, but just stating here explicitly for the >benefit of the list). It is possible to use a Clean/Smudge filter to normalize the format to be independent of the endian-ness of the target platforms? I have to admit being a fan of that approach. --Randall