apple-data-compression
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -55,3 +55,3 @@ var ADC = module.exports | ||
ADC.getOffset = function( buffer, position ) { | ||
var chunkType = ADC.getChunkType( buffer[position] ) | ||
var chunkType = ADC.getChunkType( buffer[ position ] ) | ||
switch( chunkType ) { | ||
@@ -58,0 +58,0 @@ case ADC.CHUNK_DATA: |
@@ -6,3 +6,2 @@ const ADC = require( './adc' ) | ||
// The value of 128 was chosen as it's the next power of 2 from 67 | ||
// const window = Buffer.allocUnsafeSlow( 65535 + 128, 0 ) | ||
var windowOffset = 0 | ||
@@ -26,3 +25,3 @@ var windowSize = 65535 + 67 | ||
var length = ADC.getChunkLength( buffer[ position ] ) | ||
var data = Buffer.alloc( length, 0 ) | ||
var data = Buffer.allocUnsafe( length ) | ||
var offset = windowSize - data.length | ||
@@ -49,3 +48,3 @@ | ||
var offset = ADC.getOffset( buffer, position ) | ||
var data = Buffer.alloc( length, 0 ) | ||
var data = Buffer.allocUnsafe( length ) | ||
var slidePosition = windowSize - data.length | ||
@@ -52,0 +51,0 @@ |
@@ -90,3 +90,3 @@ var ADC = require( './adc' ) | ||
_flush( done ) { | ||
this._decode( Buffer.alloc(0), done ) | ||
this._decode( Buffer.allocUnsafe(0), done ) | ||
}, | ||
@@ -93,0 +93,0 @@ |
{ | ||
"name": "apple-data-compression", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Apple Data Compression (ADC) Scheme", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
10159
213