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

block-file

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

block-file - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

10

lib/block_file.js

@@ -372,2 +372,3 @@ // File: block_file.js

// console.warn("BlockFile#flush: called!")
async.series( [ function(scb){ self.writeSegments(scb) }

@@ -614,3 +615,3 @@ , function(scb){ self.writeHeader(scb) }

var seg = this.segment[hdl.segNum]
var seg = this.segments[hdl.segNum]

@@ -684,3 +685,6 @@ var ok = seg.release(hdl)

cb = hdl
hdl = undefined
}
//hdl == null covers null and undefined
if ( hdl == null || hdl.size() < buffer.length) {
numBlks = Math.ceil( buffer.length / this.props.blockSize() )

@@ -690,4 +694,2 @@ hdl = this.reserve(numBlks)

//this._store(buffer, hdl, cb)
blkOff = this._calcBlkOff(hdl.segNum, hdl.blkNum)

@@ -694,0 +696,0 @@ fs.write( this.fd

@@ -143,3 +143,14 @@

/**
* Calculate the size of space (in bytes) that the Handle points to.
*
* @return {Number} non-zero positive integer number of bytes
*/
Handle.prototype.size = function(){
return (this.spanNum+1) * this.props.blockSize()
}
/**
* Encode a handle into a 32 or 64 (based on props) value.

@@ -146,0 +157,0 @@ *

2

package.json
{
"name" : "block-file"
, "version" : "1.1.1"
, "version" : "1.1.2"
, "description" : "A library to read/write blocks from a file"

@@ -5,0 +5,0 @@ , "keywords" : ["block", "buffer", "storage"]

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