Skip to content

Conversation

@kimgr
Copy link
Contributor

@kimgr kimgr commented Jan 20, 2025

The Avro specification details a Single Object Encoding using a header to associate a schema ID with an Avro payload. The ID is defined as the CRC64 fingerprint in little-endian encoding.

The pkg/crc64 module only provides big-endian CRC64, and the CRC64-AVRO fingerprint type is implemented as such. The specification does not detail endianness of the CRC64-AVRO fingerprint itself (only when embedded in an SOE header).

To avoid breaking existing CRC64-AVRO fingerprints, add a new fingerprint type CRC64-AVRO-LE, identical to CRC64-AVRO except little-endian.

Add an additional crc64.SumLittleEndian function to distrurb existing code as little as possible.

Add tests and benchmarks for the Sum functions.

Fixes #489.

The Avro specification details a Single Object Encoding using a header
to associate a schema ID with an Avro payload. The ID is defined as the
CRC64 fingerprint in little-endian encoding.

The pkg/crc64 module only provides big-endian CRC64, and the CRC64-AVRO
fingerprint type is implemented as such. The specification does not
detail endianness of the CRC64-AVRO fingerprint itself (only when
embedded in an SOE header).

To avoid breaking existing CRC64-AVRO fingerprints, add a new
fingerprint type CRC64-AVRO-LE, identical to CRC64-AVRO except
little-endian.

Add an additional crc64.SumLittleEndian function to distrurb existing
code as little as possible.

Add tests and benchmarks for the Sum functions.

Fixes hamba#489.
@kimgr
Copy link
Contributor Author

kimgr commented Jan 20, 2025

See also #491

@kimgr
Copy link
Contributor Author

kimgr commented Jan 23, 2025

Closed, seems like everyone prefers #491.

@kimgr kimgr closed this Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

CRC64 schema fingerprint endianness

1 participant