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

@ronomon/deduplication

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ronomon/deduplication - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

23

binding.js

@@ -100,3 +100,3 @@ 'use strict';

) {
if (sourceSize <= minimum) return sourceSize;
if (sourceSize <= minimum) return -1;
if (sourceSize > maximum) sourceSize = maximum;

@@ -120,3 +120,3 @@ var sourceStart = sourceOffset;

}
return sourceOffset - sourceStart;
return -1;
}

@@ -178,6 +178,3 @@

while (sourceOffset < sourceLength) {
// If more `source` buffers will follow and if current `source` buffer does
// not have more than `minimum` remaining, then avoid artificial cutpoint:
if (flags === 0 && (sourceLength - sourceOffset) <= minimum) break;
var chunkSize = cut(
var result = cut(
average,

@@ -192,5 +189,15 @@ minimum,

);
if (chunkSize <= 0) {
throw new Error('chunkSize <= 0');
if (result < 0) {
// No natural cut point was found.
var chunkSize = sourceLength - sourceOffset;
if (chunkSize > maximum) chunkSize = maximum;
// If source is not the last buffer, we may yet find a larger chunk.
// If chunkSize === maximum, we will not find a larger chunk and can emit.
if (flags === 0 && chunkSize < maximum) break;
} else {
var chunkSize = result;
}
if (chunkSize === 0) {
throw new Error('chunkSize === 0');
}
if (chunkSize < minimum && flags === 0) {

@@ -197,0 +204,0 @@ throw new Error('chunkSize < minimum && flags === 0');

{
"name": "@ronomon/deduplication",
"version": "1.1.0",
"version": "1.2.0",
"description": "Fast multi-threaded content-dependent chunking deduplication for Buffers in C++ with a reference implementation in Javascript. Ships with extensive tests, a fuzz test and a benchmark.",

@@ -5,0 +5,0 @@ "main": "binding.node",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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