Brian White
b7c23ac3f5
Incorporate endianness into buffer.read* function names instead of passing in a boolean flag
14 years ago
Ryan Dahl
2689d262ec
Make buffer.INSPECT_MAX_BYTES public for mscdex
14 years ago
Ryan Dahl
7332c4022f
Truncate Buffer.inspect at 50 bytes
14 years ago
Robert Mustacchi
0df08c6a0c
Endian argument should be a boolean. Signed integers shouldn't run through checks for unsigned integers. Clean up jslint. Provide unchecked uint entry points.
14 years ago
Ryan Dahl
8527f00c3c
Lazy load a few modules
14 years ago
koichik
50e147bd03
Add an optional length argument to Buffer.write()
Fixes #243 .
Fixes #1361 .
14 years ago
Devon Govett
562b469b35
More accurite error messages when writing beyond the length of a Buffer.
Fixes #1336 .
14 years ago
Brian White
e505a1215c
Add reading/writing of floats and doubles from/to buffers
Code for readIEEE754/writeIEEE754 is from jspack: http://code.google.com/p/jspack/
14 years ago
Konstantin Käfer
5e1b7cadb4
Add Buffer::fill method to do memset
Fixes #477 .
14 years ago
Robert Mustacchi
9812e31e8b
Add reading/writing of C integers to buffers
14 years ago
koichik
fcc04e67c8
Fix SlowBuffer.write() with 'ucs2' throws ReferenceError.
14 years ago
Ryan Dahl
038306a6c3
Closes GH-843. Fix SlowBuffer.prototype.slice
14 years ago
Ryan Dahl
6111c17a0e
correct hexSlice end
14 years ago
isaacs
3c9fb3ec1a
Fix invalid end handling for SlowBuffer#hexSlice
14 years ago
Ryan Dahl
ab190d38b7
Fix buffer.toString('hex')
14 years ago
Ryan Dahl
55048cdf79
Update copyright headers
14 years ago
isaacs
0aa1a8a005
Closes GH-695 Add 'hex' encoding to Buffer
14 years ago
isaacs
2e6a263e29
Closes GH-609 Support array-ish args to Buffer ctor
Any array-ish thing (whether a Buffer, an Array, or just an object with
a numeric "length") is interpreted as a list of bytes.
14 years ago
Konstantin Käfer
9e101f2b01
UCS-2 support
Closes GH-644.
14 years ago
Ryan Dahl
97e13748fa
Typos
Closes GH-557.
Closes GH-539.
14 years ago
Ryan Dahl
db78043d52
lint
14 years ago
Ryan Dahl
aed0ba3211
buffer.copy targetStart defaults to 0
14 years ago
Ryan Dahl
6d7242b485
Document defaults for buffer.copy()
14 years ago
Ryan Dahl
4f32a59307
Fix buffer.slice(0, 0)
14 years ago
Stéphan Kochen
57eb5cb9a0
Make SlowBuffer pass Buffer.isBuffer test.
14 years ago
Ryan Dahl
515f006b6e
Add legacy methods to Buffer
14 years ago
Ryan Dahl
cf1db4f304
base64 decode should handle whitespace
14 years ago
Ryan Dahl
77fc61d539
Default value for second arg of Buffer#slice
14 years ago
Ryan Dahl
b8bfbdab48
Rename SlowBuffer in binding
15 years ago
Ryan Dahl
5bc4efe820
Remove blobs, simplify SlowBuffer
Implement SlowBuffer.prototype.slice in js
15 years ago
Ryan Dahl
ba2e4a2306
Simplify fast buffer constructor
15 years ago
Ryan Dahl
3e9f636b64
Improve long buffer test
15 years ago
Ryan Dahl
17ba821e60
defineProperty is slow, don't use it for fastbuffer
15 years ago
Ryan Dahl
d3fcd1c75a
Expose SlowBuffer
15 years ago
Ryan Dahl
8b4f1e05f9
Expose Buffer.poolSize
15 years ago
Ryan Dahl
5506f99dfa
map charsWritten to fast buffer
15 years ago
Ryan Dahl
7b772f3f68
More fast buffer work
15 years ago
Ryan Dahl
d5bdda74c1
fast buffer bounds checking in copy()
15 years ago
Tim-Smart
6ea99721f1
string.length !== Buffer.byteLength(string)
15 years ago
Ryan Dahl
2dda6be799
Fast Buffer safe constructor
15 years ago
Ryan Dahl
b87669cbf4
Fix fastbuffer style
Fix style
15 years ago
Tim-Smart
2b07c9fcae
Some silly fixes to buffer.js
15 years ago
Tim-Smart
746d487da8
FastBuffer implementation. API needs migration
15 years ago
Ryan Dahl
51ecba8da9
Add get/set methods to Buffer
15 years ago
Dmitry Baranovskiy
8ab3c3e7c3
Added ability to pass offset to buffer write and toString methods as a string, i.e. '2' and encoding as anything
15 years ago
Ryan Dahl
2c1ca4078d
Implement buffer.write for base64
There might be an off-by-one on the returned value.
15 years ago
Ryan Dahl
528015e0d8
Implement buffer.toString('base64')
15 years ago
Peter Griess
56f200af5d
Fix Buffer.toString() on 0-length slices.
- Buffer.toString('ascii', 0, 0) incorrectly returns the entire contents
of the buffer. Fix this.
- Provide similar behavior to Buffer.write() and Buffer.copy() when
dealing with 0-length in valid and invalid byte ranges.
15 years ago
Ryan Dahl
02729d4af7
instanceof Buffer to Buffer.isBuffer()
15 years ago
Blake Mizerany
898afbaf34
Buffer.prototype.write: Indifferent order preference of encoding and offset
15 years ago