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 5.4.1 to 5.4.2

19

lib/containers.js

@@ -144,2 +144,3 @@ /* jshint node: true */

this._index = 0; // Next block index.
this._remaining = undefined; // In the current block.
this._needPush = false;

@@ -238,3 +239,6 @@ this._finished = false;

nBlocks++;
this._decompress(block.data, this._createBlockCallback(chunkCb));
this._decompress(
block.data,
this._createBlockCallback(block.count, chunkCb)
);
}

@@ -250,3 +254,3 @@ chunkCb();

BlockDecoder.prototype._createBlockCallback = function (cb) {
BlockDecoder.prototype._createBlockCallback = function (count, cb) {
var self = this;

@@ -262,3 +266,3 @@ var index = this._index++;

} else {
self._queue.push(new BlockData(index, data, cb));
self._queue.push(new BlockData(index, data, cb, count));
if (self._needPush) {

@@ -275,5 +279,5 @@ self._read();

var tap = this._blockTap;
if (tap.pos >= tap.buf.length) {
if (!this._remaining) {
var data = this._queue.pop();
if (!data) {
if (!data || !data.count) {
if (this._finished) {

@@ -287,2 +291,3 @@ this.push(null);

data.cb();
this._remaining = data.count;
tap.buf = data.buf;

@@ -292,2 +297,3 @@ tap.pos = 0;

this._remaining--;
this.push(this._readValue(tap)); // The read is guaranteed valid.

@@ -555,4 +561,3 @@ };

* This can be used to preserve block order since compression and decompression
* can cause some some blocks to be returned out of order. The count is only
* used when encoding.
* can cause some some blocks to be returned out of order.
*/

@@ -559,0 +564,0 @@ function BlockData(index, buf, cb, count) {

{
"name": "avsc",
"version": "5.4.1",
"version": "5.4.2",
"description": "Avro for JavaScript",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/mtth/avsc",

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