Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

avsc

Package Overview
Dependencies
Maintainers
1
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

avsc - npm Package Compare versions

Comparing version 3.2.0 to 3.2.2

18

lib/containers.js

@@ -19,3 +19,4 @@ /* jshint node: true */

type: 'record',
name: 'org.apache.avro.file.Header',
name: 'Header',
namespace: 'org.apache.avro.file',
fields : [

@@ -31,3 +32,4 @@ {name: 'magic', type: {type: 'fixed', name: 'Magic', size: 4}},

type: 'record',
name: 'org.apache.avro.file.Block',
name: 'Block',
namespace: 'org.apache.avro.file',
fields : [

@@ -161,4 +163,3 @@ {name: 'count', type: 'long'},

var tap = this._tap;
var header = HEADER_TYPE._read(tap);
if (!tap.isValid()) {
if (tap.buf.length < MAGIC_BYTES.length) {
// Wait until more data arrives.

@@ -168,7 +169,12 @@ return false;

if (!MAGIC_BYTES.equals(header.magic)) {
if (!MAGIC_BYTES.equals(tap.buf.slice(0, MAGIC_BYTES.length))) {
this.emit('error', new Error('invalid magic bytes'));
return;
return false;
}
var header = HEADER_TYPE._read(tap);
if (!tap.isValid()) {
return false;
}
var codec = (header.meta['avro.codec'] || 'null').toString();

@@ -175,0 +181,0 @@ this._decompress = (this._codecs || BlockDecoder.getDefaultCodecs())[codec];

{
"name": "avsc",
"version": "3.2.0",
"version": "3.2.2",
"description": "Blazingly fast serialization",

@@ -36,3 +36,2 @@ "homepage": "https://github.com/mtth/avsc",

"clean": "rm -rf coverage node_modules",
"dist": "browserify --standalone avsc . | uglifyjs -c -m --preamble \"/* v$(jq -r <package.json .version) */\" >dist/avsc.min.js",
"perf": "node etc/benchmarks/javascript/perf.js etc/schemas/*",

@@ -39,0 +38,0 @@ "test": "mocha",

@@ -80,10 +80,2 @@ # Avsc [![NPM version](https://img.shields.io/npm/v/avsc.svg)](https://www.npmjs.com/package/avsc) [![Build status](https://travis-ci.org/mtth/avsc.svg?branch=master)](https://travis-ci.org/mtth/avsc) [![Coverage status](https://coveralls.io/repos/mtth/avsc/badge.svg?branch=master&service=github)](https://coveralls.io/github/mtth/avsc?branch=master)

+ Check whether a value fits a given schema:
```javascript
var type = avsc.parse('./Person.avsc');
var person = {name: 'Bob', address: {city: 'Cambridge', zip: '02139'}};
var status = type.isValid(person); // Boolean status.
```
+ Get a [readable stream][readable-stream] of decoded values from an Avro

@@ -90,0 +82,0 @@ container file:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc