Skip to content

Rabin 64 bit crc fingerprint for AVRO Single-object encoding

License

Notifications You must be signed in to change notification settings

spikepanx/avro-crc64

Repository files navigation

avro-crc64

Build Status Coverage Status

Features

  • Computes the 64-bit AVRO fingerprint for a given AVRO schema string

Installation

npm install avro-crc64

Documentation

Examples

const { fingerprint64AvroSchema } = require('avro-crc64');

const avroSchemaExample = {
  type: 'record',
  name: 'Example',
  doc: 'Simple example avro schema',
  fields: [
    {
      name: 'foobar',
      type: 'string',
      doc: 'foobar is all about barbazz',
    },
  ],
};

fingerprint64AvroSchema(JSON.stringify(avroSchemaExample))
  .then((uint8) => {
    const hexFingerprint = Buffer.from(uint8.buffer).toString('hex');

    return console.log(hexFingerprint); // logs "b75d6f7da238cf70"
  })
;```

About

Rabin 64 bit crc fingerprint for AVRO Single-object encoding

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published