11## Buffer
2- The ** ` Buffer ` ** object is used to represent a contiguous block of memory
2+ The ` Buffer ` object is used to represent a contiguous block of memory of bytes.
33
44## Description
55
@@ -8,26 +8,48 @@ for storing data without overflowing.
88
99## Methods
1010
11- * The Buffer.create(size: number) method stores bytes in a fixed size of memory.
11+ Buffer.create(size: number)
12+
13+ allocates a new buffer in fixed size of memory.
1214
13- * The Buffer.setNumber(format: NumberFormat, offset: number, value: number) method writes a number in a specified format in the buffer
15+ Buffer.setNumber(format: NumberFormat, offset: number, value: number)
16+
17+ writes a number in a specified format in buffer
1418
15- * The Buffer.getNumber(format: NumberFormat, offset: number) method reads a number in a specified format in the buffer
19+ Buffer.getNumber(format: NumberFormat, offset: number)
20+
21+ reads a number in a specified format in buffer
1622
17- * The Buffer.setUint8(offset: number, value: number) method writes an unsigned number in a particular location in the buffer
23+ Buffer.setUint8(offset: number, value: number)
24+
25+ writes an unsigned number in a particular location in buffer
1826
19- * The Buffer.getUint8(offset: number) method reads an unsigned number in a particular location in the buffer
27+ Buffer.getUint8(offset: number)
28+
29+ reads an unsigned number in a particular location in buffer
2030
21- * The Buffer.write(dstOffset: number, src: Buffer) method writes contents of the buffer merged into the current buffer (the buffer your using)
31+ Buffer.write(dstOffset: number, src: Buffer)
32+
33+ writes contents of buffer merged into current buffer ( buffer your using)
2234
23- * The Buffer.equals(other: Buffer) method checks if 2 buffers hold the same data
35+ Buffer.equals(or: Buffer)
36+
37+ checks if 2 buffers hold same data
2438
25- * The Buffer.chunked(maxSize: number): Buffer[ ] method breaks the buffer into pieces, none exceeding the specified size.
39+ Buffer.chunked(maxSize: number): Buffer[ ]
40+
41+ breaks buffer into pieces, none exceeding specified size.
2642
27- * The Buffer.isReadOnly() method reads if the buffer cannot be modified, otherwise it returns false
43+ Buffer.isReadOnly() reads if
44+
45+ buffer cannot be modified, orwise it returns false
2846
29- * The Buffer.hash(bits: int32) method computes a k-bit non-cryptographic hash of the buffer using
30- the FNV-1 algorithm.
47+ Buffer.hash(bits: int32)
48+
49+ computes a k-bit non-cryptographic hash of buffer using
50+ FNV-1 algorithm.
3151
3252## Properties
33- * The Buffer.length property returns the total area of the buffer
53+ Buffer.length
54+
55+ returns total length of buffer
0 commit comments