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

buffered-writer

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buffered-writer

Fully configurable buffered writer.

  • 0.1.11
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Node BufferedWriter

Fully configurable buffered writer for node.js

Show me! | Availability | Compatibility | Documentation

Version: 0.1.11

When you need to write a file you typically write the content in little chunks at a time. To avoid multiple calls to the underlying I/O layer you need to use a piece of memory called "buffer", so instead of writting directly to the disk, you write to the buffer and when it is filled the content is written to disk. Doing this you win performance.

This library allows you to write files using internal buffers, so you don't have to worry about them.

Show me!
var BufferedWriter = require ("buffered-writer");

new BufferedWriter ("file")
	.on ("error", function (error){
		console.log (error);
	})
	
	.write ([0x00, 0x01, 0x02], 0, 3) //Writes 0x00, 0x01, 0x02
	.write (new Buffer ([0x03, 0x04]), 1, 1) //Writes 0x04
	.write (0x0506) //Writes 0x05, 0x06
	.close ();

Availability

Via npm:

npm install buffered-writer

Compatibility

✔ Node 0.4.10+


Documentation

Reference
Examples
Change Log
MIT License

Keywords

FAQs

Package last updated on 17 Aug 2012

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