avro-crc64

0.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i avro-crc64

Weekly Downloads

339

Version

0.1.0

License

MIT

Unpacked Size

9.37 kB

Total Files

14

Last publish

Collaborators

  • spikepanx