avro-crc64

Rabin 64 bit crc fingerprint for AVRO Single-object encoding

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
avro-crc64
140.1.05 years ago5 years agoMinified + gzip package size for avro-crc64 in KB

Readme

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

```js 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"
}) ;```