Comparing version 5.6.2 to 5.6.3
@@ -246,3 +246,3 @@ /* jshint node: true */ | ||
block.data, | ||
this._createBlockCallback(block.count, chunkCb) | ||
this._createBlockCallback(block.data.length, block.count, chunkCb) | ||
); | ||
@@ -259,3 +259,3 @@ } | ||
BlockDecoder.prototype._createBlockCallback = function (count, cb) { | ||
BlockDecoder.prototype._createBlockCallback = function (size, count, cb) { | ||
var self = this; | ||
@@ -271,2 +271,3 @@ var index = this._index++; | ||
} else { | ||
self.emit('block', new BlockInfo(count, data.length, size)); | ||
self._queue.push(new BlockData(index, data, cb, count)); | ||
@@ -531,3 +532,3 @@ if (self._needPush) { | ||
pos = pos || tap.pos; | ||
this._compress(tap.buf.slice(0, pos), this._createBlockCallback(cb)); | ||
this._compress(tap.buf.slice(0, pos), this._createBlockCallback(pos, cb)); | ||
this._blockCount = 0; | ||
@@ -558,3 +559,3 @@ }; | ||
BlockEncoder.prototype._createBlockCallback = function (cb) { | ||
BlockEncoder.prototype._createBlockCallback = function (size, cb) { | ||
var self = this; | ||
@@ -573,2 +574,3 @@ var index = this._index++; | ||
self._pending--; | ||
self.emit('block', new BlockInfo(count, size, data.length)); | ||
self._queue.push(new BlockData(index, data, cb, count)); | ||
@@ -585,2 +587,9 @@ if (self._needPush) { | ||
/** Summary information about a block. */ | ||
function BlockInfo(count, raw, compressed) { | ||
this.valueCount = count; | ||
this.rawDataLength = raw; | ||
this.compressedDataLength = compressed; | ||
} | ||
/** | ||
@@ -587,0 +596,0 @@ * An indexed block. |
{ | ||
"name": "avsc", | ||
"version": "5.6.2", | ||
"version": "5.6.3", | ||
"description": "Avro for JavaScript", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/mtth/avsc", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
262041
8140