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

fatbuffer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fatbuffer

a Buffer but a fat one.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Node FatBuffer

NodeJS Buffer interface has a maximum length of 2147483647 bytes, but what if we need more ?

One solution is to distribute the data on multiple buffers and map each index to one of the buffers. This is what the library is about, no need to do the mapping, you'll get the same interface as the original 'Buffer' but with infinite Buffer size which is around (2147483647 * 2^32 -1) = 9 x 10^9 gb).

Build Status bitHound Dependencies bitHound Overall Score issues stars license

Installation

npm install fatbuffer --save

Initializing a FatBuffer

FatBuffer.alloc(length)
Parameters:
length: length in bytes.

Properties

.length

Returns length in bits.
Usage
const FatBuffer = require("FatBuffer")

const buffer = FatBuffer.alloc(2147483647*5);

buffer[2147483647*3]=255;
console.log(buffer[2147483647*3]) // 255


Implementation

Array of buffers and some mapping techniques.

Keywords

FAQs

Package last updated on 06 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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