Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 59 lines (39 sloc) 1.687 kB
1585f00 @gagle v0.0.1
authored
1 <a name="start"></a>
2
3 Node BufferedWriter
4 ===================
5
6 #### Fully configurable buffered writer for node.js ####
7
7ab4660 @gagle updated readme
authored
8 [Show me!](#showme) | [Availability](#availability) | [Compatibility](#compatibility) | [Documentation](#documentation)
1585f00 @gagle v0.0.1
authored
9
4da7f86 @gagle v0.1.11
authored
10 Version: 0.1.11
1585f00 @gagle v0.0.1
authored
11
12 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.
13
14 This library allows you to write files using internal buffers, so you don't have to worry about them.
15
7ab4660 @gagle updated readme
authored
16 <a name="showme"></a>
17 #### Show me! [](#start) ####
18
19 ```javascript
20 var BufferedWriter = require ("buffered-writer");
21
22 new BufferedWriter ("file")
23 .on ("error", function (error){
24 console.log (error);
25 })
26
27 .write ([0x00, 0x01, 0x02], 0, 3) //Writes 0x00, 0x01, 0x02
28 .write (new Buffer ([0x03, 0x04]), 1, 1) //Writes 0x04
29 .write (0x0506) //Writes 0x05, 0x06
30 .close ();
31 ```
32
33 ***
34
1585f00 @gagle v0.0.1
authored
35 <a name="availability"></a>
36 #### Availability [](#start) ####
37
38 Via npm:
39
40 ```
41 npm install buffered-writer
42 ```
43
44 ***
45
46 <a name="compatibility"></a>
47 #### Compatibility [](#start) ####
48
067908e @gagle Updated README.md
authored
49 ✔ Node 0.4.10+
1585f00 @gagle v0.0.1
authored
50
51 ***
52
53 <a name="documentation"></a>
54 #### Documentation [](#start) ####
55
56 [Reference](https://github.com/Gagle/Node-BufferedWriter/wiki/Reference)
57 [Examples](https://github.com/Gagle/Node-BufferedWriter/tree/master/examples)
a83be1e @gagle updated modules and readme
authored
58 [Change Log](https://github.com/Gagle/Node-BufferedWriter/wiki/Change-Log)
1585f00 @gagle v0.0.1
authored
59 [MIT License](https://github.com/Gagle/Node-BufferedWriter/blob/master/LICENSE)
Something went wrong with that request. Please try again.